HTML in Message Body..a little help please.

Discussion for developers using MailEnable.
Post Reply
DJVan
Posts: 10
Joined: Mon Jul 29, 2002 4:36 am
Location: Ottawa, Ontario Canada

HTML in Message Body..a little help please.

Post by DJVan »

I'm getting the below error when trying to apply HTML coding withing the MESSAGEBODY line. Any help would be great. I am very new to ASP, so please bear with me.

Cheers
DJVan


Microsoft VBScript compilation error '800a0401'

Expected end of statement

/Default.asp, line 181

oME.MessageBody = "<html><head><title>Realty Presenter Test</title></head><body><p>Thank You for subscribing to our list Notification.<br> To complete your subscription, please click the CONFIRMATION link below.<a href="mailto:listaddress@domain.com?subject=subscribe">*Confirmation*</a></font></p><p>Thank You, <br> Subscription Manager</font></p></body></html>"
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------^
DVanRemortel
email: davidvan@backland.net

MailEnable
Site Admin
Posts: 4441
Joined: Tue Jun 25, 2002 3:03 am
Location: Melbourne, Victoria Australia

Post by MailEnable »

Change to:

oME.MessageBody = "<html><head><title>Realty Presenter Test</title></head><body><p>Thank You for subscribing to our list Notification.<br> To complete your subscription, please click the CONFIRMATION link below.<a href=""mailto:listaddress@domain.com?subject=subscribe"">*Confirmation*</a></font></p><p>Thank You, <br> Subscription Manager</font></p></body></html>"

Reason: When you assign a string containing quotes you need to represent the quote in the literal string as a double quote. ie: "".
This allows ASP to identify the difference between the end of string and quotes within the string.
Regards, Andrew

DJVan
Posts: 10
Joined: Mon Jul 29, 2002 4:36 am
Location: Ottawa, Ontario Canada

Is Images Possible?

Post by DJVan »

Dave, thank you for such a quick reply.
Is it also possible to include images from an internet source?

Thanks
DVanRemortel
email: davidvan@backland.net

MailEnable
Site Admin
Posts: 4441
Joined: Tue Jun 25, 2002 3:03 am
Location: Melbourne, Victoria Australia

Post by MailEnable »

For Sure - Example:

Code: Select all

oME.MessageBody = "<html><head><title>Realty Presenter Test</title></head><body><p>Thank You for subscribing to our list Notification.<br> To complete your subscription, please click the CONFIRMATION link below.<a href=""mailto:listaddress@domain.com?subject=subscribe"" BORDER=0><img src=""http://www.mailenable.com/head_proedition.gif""></a></font></p><p>Thank You, <br> Subscription Manager</font></p></body></html>" 
Regards, Andrew

DJVan
Posts: 10
Joined: Mon Jul 29, 2002 4:36 am
Location: Ottawa, Ontario Canada

All is great....Cheers

Post by DJVan »

Many Many Thanks
DVanRemortel
email: davidvan@backland.net

Post Reply