| Author |
Thread |
| Sending html News Letter |
|
Posted in tutorial: Create your own Newsletter in ASP 3.0 |
· lyanez
Joined: 10 Dec 2002 Total Posts: 2 |
Sending html News LetterPosted: 10 Dec 2002
Hi, I'm a newbie on this matters, but i used your script and worked great at the first try. Now i have a question, is there a way of comberting this text-only news letter into a html news letter? I saw some mail.BodyFormat thing somewere... is this related? Thank's
|
· Faisal Khan
Joined: 24 Sep 2002 Total Posts: 595 |
Re: Sending html News Letter Posted: 12 Dec 2002
By default if you specify no BodyFormat property, the email will be sent in text/plain format with no HTML formatting. To use HTML instead of plain text, add following line above the "mail.Body" property: mail.BodyFormat = CdoBodyFormatHTML
Now you should be able to send HTML formatted emails. :)
|
· lyanez
Joined: 10 Dec 2002 Total Posts: 2 |
Re: Sending html News Letter Posted: 13 Dec 2002
Thank's, it worked nicely, but I sitill had two problems, if I read the email sent through a web based mail i would only see the code so i used a line I saw on other script:
mail.MailFormat = 0
Right after mail.BodyFormat and then I could see it right.
The problem that remains is that the link on the message variable displays as text not as a link, i tried to add the link fotmat to it, but the email= variable would not display the mail addres on the link.
So I made a form similar to the mail.html but it would submit you to the del.asp file in wich i changed the line:
email = Request.QueryString("email")
for
email = Request.Form("email")
This works, but I'd rather have the link you supplied in the first plase, because it is so much simpler for the user to follow.
|
· eniojur
Joined: 2 Dec 2002 Total Posts: 4 |
good question Posted: 14 Dec 2002
I was about to ask this question. Great.
Nobody receive the message.
in this stream have I to configure some?
Set mail = Server.CreateObject("CDONTS.NewMail")
|
· Faisal Khan
Joined: 24 Sep 2002 Total Posts: 595 |
Re: Sending html News Letter Posted: 14 Dec 2002
One rather difficult option would be to use "To Unsubscribe, Reply to this email with 'Remove' in the subject line".
To do that, you'll have to create a separate email account for that list e.g. list1@yoursite.com. Then set the mail.From to list1@yoursite.com. Every user which wants to unsubscribe will send email to list1@yoursite.com with 'Remove' in the subject line.
Now you should have an ASP script with a POP3 COM component. That ASP script e.g. unsubscribeUsers.asp, will when called by you, connect to your POP3 server, receive all the emails for list1@yoursite.com. Then iterate through that list and separate the emails with 'Remove' in the subject line. Then run an SQL command to delete all users from the list whose 'From' address in the 'Remove' email is found in the 'Newsletter' database.
I hope you'd have got the idea. I know it is difficult to implement but then hey, it is an option. :)
|
· khaen
Joined: 17 Jan 2003 Total Posts: 1 |
mail Charset Posted: 17 Jan 2003
Thank you for this tutorial, it is easy and nice! I have an offtopic question. I tried this with Japanese and everything works, as it should, but sended mail comes in Western encoding, so the user should set the browser encoding to Japanese in order to view newsletter. Is there a way to set a default encoding for sended mail in CDONTS? TIA, Elena
|