views:

619

answers:

2

Hi,

I'm developing a site where I need to send HTML newsletters to a mailing-list.

I have build a html frame where I have my "View in browser" and "Unsubscrib" links (which of cause will vary). In the admin module, I post html and uploads images for the html-newsletter. Is this a good way to do it?

How should I send the e-mails the XX.XXX persons? I can't use BCC because the unsubscribe link will vary. So I guess I have to sendt all the e-mails seperately. But the code shall be fault tollerant so only half get the newsletter if there is a error.

Best regards, Lasse

A: 

yes you will need to send the emails one by one if you want a unique unsubscribe link for each client. you may send the same email to everyone if you put a textbox on the page where people can unsubscribe by typing in their emails.

as for the email being sent out, you have the right idea. you need to host the images on your server and call these from you html.

the html must be basic html 3.0 or something of the sort. this will ensure that most email clients will properly render your email.

be extra careful when making a mailing list, it can be very easy to get banned from certain servers such as google or hotmail.

Alexandre Brisebois
I could do that but a textbox is bad userexperience :/ when I send multiple different e-mails will the server not give a timeout eventually?
lasseespeholt
I agree that a textbox is bad user exprience, but its also a good way to keep lazy people on the mailing list
Alexandre Brisebois
+6  A: 

Hope these are helpfull:

  1. Use MailDefinition as a templating engine http://msdn.microsoft.com/en-us/library/system.web.ui.webcontrols.maildefinition.aspx If your numbers are large you may look into not using SMTP as a transport protocol, but rather generating files for each email you wish to send and then putting them directly into the "Drop" folder of your SMTP server. Mirosoft SMTP Server allows this quite easily.

  2. Use a unique bounce back email address for each email (but include a reply-to to a real address, such as office (at) yourdomain.com. Let those bounce back email addresses point to one common account and after sending your newsletter remove all addresses that bounced from your database.

  3. As for fault tolerance, I don't think I quite understand. Why would you only want half to ge the newsletter? I would catch any server related issues and stop the processing immediately, and any client related issues (client's email does not work, see 2.) are either skipped and logged (if detected during processing) or processed later (if detected later).

  4. Depending on your local laws check opt-in/opt-out policies.

  5. Also take a look at embedding images directly into the html (a not well known fact is that you can embed images directly into ) this will usually make email size larger but it will let Outlook display those images directly without going to your server. Of course if you want newsletter tracking via an image beacon or similar then server images are what you want.

  6. Of course check all common email clients for correct display. AFAIK it is almost impossible to send a format that each and every client will display correctly unless you send plain text :)

AlexDuggleby
1. I will look into it :)2. It should be noted that I'm using a webhotel and not my own server. But can't failed e-mail addresses not be caught on processing?3. My english is not very good, so I think your misunderstod me. I don't want to send half of the newsletter. But if I have a for-loop which sends a e-mail to each e-mail address what will happen if it fails inside the for-loop?5. I know, but I would prefer not to send a large e-mail over my webhotel.6. Yup :)I don't think I will send more than 3-5000 e-mails at once but I would be nice to be futureproof.
lasseespeholt
2. Not always. Usually the smtp server you are sending to will only issue a "recipient not found" if it a single server system that knows about all it's recipients. Take a larger system and the incoming server doesn't know about the account. 3. Just put the try catch inside the loop and log the error. for then try then send mail send catch (log) then end for.5. Ok then server side images are probably the only solution, but a lot of providers won't show them initially unless the user has decided to trust your newsletter sending email address.
AlexDuggleby
Okay thanks for help :)
lasseespeholt
hi alex,how can i achieve step 1 --"If your numbers are large you may look into not using SMTP as a transport protocol, but rather generating files for each email you wish to send and then putting them directly into the "Drop" folder of your SMTP server. Mirosoft SMTP Server allows this quite easily."
Pragnesh Patel
Not quite sure what info you need, but basically simply generate one .eml file (AFAIR you can save MailMessage to an .eml file) and put them in c:\inetpub\mailroot\drop (or similar depending on which SMTP server you are using). HTH
AlexDuggleby