ASP Mail

P

polilop

I made a form in which I send the visitor a link to my page
but when the visitor gets that link in the mail it dosent send him
to the page just says invalid syntax
or something like outbound.......
I'm not trying to spam
this is the code iput into body variable

text= "<table width='310' border='0'> "&_
"<tr><td class='all'><p align='center'> Something <br>"&_
"something<br>"&_
" Something<br>"&_
" <strongAnd something <br>"&_
" </strong>Something!<br>"&_
" <a href='http//www.something.com'>www.something.com</a></p>
</td></tr> </table>"
I looked at code that works and its the same why dosent this work
 
R

Ray Costanzo [MVP]

Can you tell us what the actual error is and when this error occurs? The
error appears in the e-mail? In a Web page? Somewhere else?

Ray at work
 
P

polilop

When the mail arrives to the recipient and when you click on the link
outlook asks you for the executable program
when i show it to the IE in the URL it writes this adress

outbind://15-0000000026322AE5531BF6438B074869664FD701C40C2300/http/www.something.com
and in outlook express it just opens an empty IE with nothing in the url.
 
R

Ray Costanzo [MVP]

Please show the code that you're using to generate and send the e-mail.

Ray at work
 
P

polilop

Here is the code, it sends Ok But when it arrives the link dosent work
fine.
All fields in Request are sent

<%
Set Mailer = Server.CreateObject("SMTPsvg.Mailer")
Mailer.FromName = Request.Form("sender_nm")
Mailer.FromAddress= Request.form("sender")
Mailer.RemoteHost = "mail.something.com"
Mailer.AddRecipient Request.Form("receipt_nm"), Request.form("receipt")
Mailer.CustomCharSet = "ISO-8859-2"
Mailer.ContentType = "text/html"

Mailer.Subject = "About Something"
dim text
text= "<table width='310' border='0'> "&_
"<tr><td class='all'><p align='center'> Something <br>"&_
"Something <br>"&_
" iSomething <br>"&_
" <strong>Something <br>"&_
" </strong>Something <br>"&_
" <a href='http//www.something.com'>www.something.com</a></p>
</td></tr> </table>"


Mailer.BodyText = text

if Mailer.SendMail then
Response.Write("<p><b>Sent!&nbsp;Thanks</b></p>")
else
Response.Write "<p><b>Something happend : <br>" & Mailer.Response & "<br>try
later</b></p>"

end if
set Mailer = nothing

%>
 
R

Ray Costanzo [MVP]

I don't know that this is your problem, but one thing, you never set your
mail format to be HTML.

Mailer.ContentType = "text/html"

Ray at work

polilop said:
Here is the code, it sends Ok But when it arrives the link dosent work
fine.
All fields in Request are sent

<%
Set Mailer = Server.CreateObject("SMTPsvg.Mailer")
Mailer.FromName = Request.Form("sender_nm")
Mailer.FromAddress= Request.form("sender")
Mailer.RemoteHost = "mail.something.com"
Mailer.AddRecipient Request.Form("receipt_nm"), Request.form("receipt")
Mailer.CustomCharSet = "ISO-8859-2"
Mailer.ContentType = "text/html"

Mailer.Subject = "About Something"
dim text
text= "<table width='310' border='0'> "&_
"<tr><td class='all'><p align='center'> Something <br>"&_
"Something <br>"&_
" iSomething <br>"&_
" <strong>Something <br>"&_
" </strong>Something <br>"&_
" <a href='http//www.something.com'>www.something.com</a></p>
</td></tr> </table>"


Mailer.BodyText = text

if Mailer.SendMail then
Response.Write("<p><b>Sent!&nbsp;Thanks</b></p>")
else
Response.Write "<p><b>Something happend : <br>" & Mailer.Response &
 
P

polilop

if i dont set it text/html how am i able to send the recipient the link with
<a href....
I know that he can just rewrite the adress but it's easier for the
recipient just clicking on the link
 
P

polilop

i dont think that the problem is in the SMTPsvg.Mailer i think that there is
a catch
in the outlook that just dosent get where it has to go allso i just read
sowhere it starts
with sp2 security. no one knows why. I will try copying code from a mail
message made in
outlook and then put it into the tex variable and then sending it.
 
J

Jeff Cochran

if i dont set it text/html how am i able to send the recipient the link with
<a href....
I know that he can just rewrite the adress but it's easier for the
recipient just clicking on the link

That's a client issue. Some clients will format any web address as a
link. Others you have to send it in HTML format or it won't show a
link.

But I don't think that's the issue. Look at the actual raw text of
the email message as received. If it has the link correctly shown,
then it's a client-side issue.

Jeff
 
R

Ray Costanzo [MVP]

Setting that property to text/html will make it an html message, not a plain
text message.

Ray at work
 
K

Kyle Peterson

read the articles... it is on most servers by default despite wht your web
proivder might tell you

I have had a lot of trouble with aspmail and html messages acting weird in
the past.. I now use CDOSYS for nearly everything and have better luck in
general
 
P

polilop

Must disagree becouse when i send the same person a link that i put through
a mail message composed in outlook it works.
My bigest dilema is that the link is shown correctly in the mail message.
 
B

Brian Cryer

polilop said:
I made a form in which I send the visitor a link to my page
but when the visitor gets that link in the mail it dosent send him
to the page just says invalid syntax
or something like outbound.......
I'm not trying to spam
this is the code iput into body variable

text= "<table width='310' border='0'> "&_
"<tr><td class='all'><p align='center'> Something <br>"&_
"something<br>"&_
" Something<br>"&_
" <strongAnd something <br>"&_
" </strong>Something!<br>"&_
" <a href='http//www.something.com'>www.something.com</a></p>
</td></tr> </table>"
I looked at code that works and its the same why dosent this work

What you're doing looks okay to me. So this is just a stab in the dark - do
you get the same problem if you use double quotes instead of single quotes
(on your a href=...)?

Brian.

www.cryer.co.uk/brian
 
J

Jeff Cochran

Must disagree becouse when i send the same person a link that i put through
a mail message composed in outlook it works.
My bigest dilema is that the link is shown correctly in the mail message.

Shown correctly isn't what I suggested you look at. Look at the *raw*
text of the email and look at the link being inserted. This link will
show fine and work as intended:

<a href="http://www.microsoft.com/">Microsoft</a>

This will show exactly the same and not work:

<a href="ThisWillNotWork/http://www.microsoft.com/">Microsoft</a>

If the link is actually correct in the email and when you click on it
the link does not work as intended, it can't be a server issue. The
server is no longer ionvolved once the message gets to the client.

Jeff
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,158
Messages
2,570,882
Members
47,414
Latest member
djangoframe

Latest Threads

Top