Help | Site Map
Connecting Tech Pros Worldwide
 
 
LinkBack Thread Tools
  #1  
Old July 19th, 2005, 07:31 AM
Raphael Gluck
Guest
 
Posts: n/a
Default ASP dundas mailer question

Hi all

I am still finding my feet creating a website in ASP, and i'm trying to get
to grips with users providing feeback to my site.
my webhosts have the dundas mailer installed, and i am trying to get it to
work for me.
does it work in conjuction with regular html? can i add a <form> and text
fields? and then will all that get sent with the page?
I have a little script but i dont know how to modify it

http://www.tripak.me.uk/dundas.txt
which when i am done with, must change to and .asp extension.
but where do i add it form content?
Say i want to ask the person viewing the page, to send me feedback, Just to
add a textfield, and some html asking for their name, how do i go about
that?

I hope someone can help me

thanks

Raphael


  #2  
Old July 19th, 2005, 07:31 AM
Tom B
Guest
 
Posts: n/a
Default Re: ASP dundas mailer question

Create a page with the appropriate fields you need to collect.

Post that form to the page you have (dundas.txt)
on the dundas.txt page, build the email up in a variable, and add it to the
objEmail.HTMLBody property. I assume there's also an objEmail.Body property
as well for those who don't use html.

So...For example
Page1.asp

<form method=post action=Dundas.asp>
<p>What's your name<input name=fname></p>
<p>What's your email address<input name=email></p>
<p><input type=submit value=Send></p>
</form>

Dundas.asp

<%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%>
<%

Dim objEmail 'stores a Mailer control object
Dim strPath 'stores path to a directory we create at same level as this ASP
page


Set objEmail = Server.CreateObject("Dundas.Mailer") 'Mailer object

'specify the recipient of this message
objEmail.TOs.Add "yourATemailaddress.com"

'specify the subject of the email
objEmail.Subject = "Sent from the web page"

'specify the sender of the message
objEmail.FromAddress = Request.Form("email")

'specify an SMTP Relay server. This increases the speed and reliability of
the operation
objEmail.SMTPRelayServers.Add Request.Form("SMTP")


Dim sBody
sBody="The user's name is " & Request.Form("fname")


'initialize the HtmlBody property, we'll throw a header into it
objEmail.HTMLBody = "<Html><Head></Head><Body>" & sBody
objEmail.SendMail

%>



"Raphael Gluck" <iwish i could tell you @alas blame the spammers> wrote in
message news:O0A8lhyXDHA.1748@TK2MSFTNGP12.phx.gbl...[color=blue]
> Hi all
>
> I am still finding my feet creating a website in ASP, and i'm trying to[/color]
get[color=blue]
> to grips with users providing feeback to my site.
> my webhosts have the dundas mailer installed, and i am trying to get it to
> work for me.
> does it work in conjuction with regular html? can i add a <form> and text
> fields? and then will all that get sent with the page?
> I have a little script but i dont know how to modify it
>
> http://www.tripak.me.uk/dundas.txt
> which when i am done with, must change to and .asp extension.
> but where do i add it form content?
> Say i want to ask the person viewing the page, to send me feedback, Just[/color]
to[color=blue]
> add a textfield, and some html asking for their name, how do i go about
> that?
>
> I hope someone can help me
>
> thanks
>
> Raphael
>
>[/color]


  #3  
Old July 19th, 2005, 07:31 AM
Raphael Gluck
Guest
 
Posts: n/a
Default Re: ASP dundas mailer question

First of all thank you very much for taking the time to reply, i really
appreciate it.

I thought it would work easy as pie, but i am having some teething problems.
I keep getting 500 internal server error when I try, a test form.
Aside from adding in the email address to the dundas asp script, I am not
clear, must I modify something else? to tell the dundas.asp page that the
previous page, page1.asp is trying to send via it;'s script?

Many thanks

Raphael


  #4  
Old July 19th, 2005, 07:31 AM
Ray at
Guest
 
Posts: n/a
Default Re: ASP dundas mailer question

First find out what the error is so you can figure out how to correct it.
http://www.aspfaq.com/2109

Ray at home

--
Will trade ASP help for SQL Server help


"Raphael Gluck" <iwish i could tell you @alas blame the spammers> wrote in
message news:OLgCcP3XDHA.3232@tk2msftngp13.phx.gbl...[color=blue]
> First of all thank you very much for taking the time to reply, i really
> appreciate it.
>
> I thought it would work easy as pie, but i am having some teething[/color]
problems.[color=blue]
> I keep getting 500 internal server error when I try, a test form.
> Aside from adding in the email address to the dundas asp script, I am not
> clear, must I modify something else? to tell the dundas.asp page that the
> previous page, page1.asp is trying to send via it;'s script?
>
> Many thanks
>
> Raphael
>
>[/color]


  #5  
Old July 19th, 2005, 07:31 AM
Raphael Gluck
Guest
 
Posts: n/a
Default Re: ASP dundas mailer question

Ok, i think i'm begining to understand, please forgive my ignorance but
I have to create a variable in the dundas.asp page

to collect the info from page1.asp

Dim sBody
sBody="The user's name is " & Request.Form("test")

assuming i called the form in page1.asp "test"

Then the line that actually calls up the variable is

'initialize the HtmlBody property, we'll throw a header into it
objEmail.HTMLBody = "<Html><Head></Head><Body>" & sBody

Is that correct? that's how my webhost put it out, did they miss a closing
</body> tag, by any chance?


  #6  
Old July 19th, 2005, 07:31 AM
Ray at
Guest
 
Posts: n/a
Default Re: ASP dundas mailer question

Do you really have a form field named tripak@tripak.me.uk? Probably not.
If you're hard coding the e-mail address, just do

objEmail.TOs.Add "tripak@tripak.me.uk"

And it's "TOs?" Interesting...

Ray at home


--
Will trade ASP help for SQL Server help


"Raphael Gluck" <iwish i could tell you @alas blame the spammers> wrote in
message news:eOz8623XDHA.2464@TK2MSFTNGP09.phx.gbl...[color=blue]
> Ah, clever never knew that, Thanks for that tip. I have IE 6 and still got
> that error 500
>
>
> DSMailer.Address.1 error '80004005'
>
> Address can not be empty string.
>
> /dundas.asp, line 11
>
>
>
> Is what is should have said, but now how to go about correcting it, my[/color]
line[color=blue]
> 11. in dundas.asp reads
>
> objEmail.TOs.Add Request.Form("tripak@tripak.me.uk")
>
> Is that wrong? or am a quoting the wrong line 11?
>
> thanks
>
>[/color]


  #7  
Old July 19th, 2005, 07:32 AM
Raphael Gluck
Guest
 
Posts: n/a
Default Re: ASP dundas mailer question

I emailed my webhost today, and indeed there was problem with the script,
which they have now corrected so it works, it was the SMTP relay server line
that needed some numbers added to! but thank you Tom for the variable help.
And thank you ray, for showing me where to put my e-mail address


Raphael


 

Bookmarks

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over network members.
Post your question now . . .
It's fast and it's free

Popular Articles