Friday, March 16, 2012

Newsletter application

I need help on creating newsletter application which creates database with name and emailaddress and sends out newsletter every month using asp.net 2.0. I need to know how to create and send news letter?

What part are you stuck on? To tell you how to program a newsletter application would take a small book. Have you looked at existing products?

Jeff


So far I only know to create front end so that user can enter their email address and subscribe or unsubscribe.

I want to know how to create Newsletter (with html, dhtml, javascript...etc very dynamic newsletter) and email every month. (this part I dont understand). There are third party products available but them might be using asp.net or some other program, I want to try myself.

can you please guide me from here?


I would suggest using the FreeTextBox control (rich, HTML type textbox), for entering your newsletter information, which is available here:
http://freetextbox.com

Then, checkout this tutorial atASPNet101.com:
http://aspnet101.com/aspnet101/tutorials.aspx?id=41


I am able to send multiple email with plain text but when I try to attach colors, pictures, formatting etc it's not working form me.

is it possible to create newsletter in Frontpage or Flash etc and attach as part of email (not as attachment). or some other better way.

I looked into free text control but I still need to figure out how to make that work.


What part isnt working, and have you made sure and used the isbodyhtml = true in your code creating the message, that is an important step.

Colors, fonts, solid tables ect are easy if you can get your email to send in html. Images are a bit different, you can either hard link them to an external server, like <img src=http://myserver.com/image.jpg /> or you need to embed the image into the email itself, much like outlook or outlook express does it Fire up OE and look at the source to a message that has an embeded picture (not an attached one).


how can I embed a HTML page created in Frontpage , flash etc as newsletter to multiple addresses?


Save to a file and attach it or copy the rendered HTML and paste it into the message. Neither are a good way to send HTML email though.

Jeff


what other options I have to make it work better? I dont want to buy any third party product. An good example will help me understand better.

Define better...your asking very general questions. Do you need help creating an html email through code? Do you have an error your getting when you try to send an email through your server using asp.net?

Do you not know how to write HTML, so that you can paste it into a mail message?

Try this...This just gets the body of the message from a text / html file. I copied an IBM newsletter that I had gotten in an email, to a textfile in my solution called...textfile.txt...original huh.

Imports

System.Net.Mail

Imports

System.IOProtectedSub DoEmail()Dim msgAsString = ReadTextFile()Dim myClientAsNew SmtpClientDim myMessageAsNew MailMessageTry

myMessage.From =

New MailAddress("email@.email.com")

myMessage.To.Add(

"to@.email.com")

myMessage.Subject =

"My Subject"

myMessage.IsBodyHtml =

True

myMessage.Body = msg

myClient.Host =

"mailserver"

myClient.Port = 25

myClient.Send(myMessage)

Catch exAs Exception

Response.Write(ex.ToString)

EndTry

EndSubProtectedFunction ReadTextFile()AsStringDim myFileAsString = Server.MapPath("textfile.txt")Dim SRAs StreamReaderTry

SR = File.OpenText(myFile)

ReadTextFile = SR.ReadToEnd()

Catch exAs Exception

ReadTextFile = ex.ToString

Finally

SR.Close()

EndTryEndFunction


I got almost 90% working. Some how my CSS stlyesheet are not working when send via email.

Include your styles in the HTML, not as separate files.

Jeff


They are included inside html.

Internall user dont see CSS effect in theri outlook but I tried to send it to my yahoo mail and it worked fine. how can i make that work for outlook users?


is your CSS an external link?
remember that viewing HTML mail is an option that can be turned off ( I have it turned off in my outlook express)
it would probably help to see some code...

It would also help to see the rendered source of a message from your outlook, so we can determine if it's not getting there the way it should.

From inside outlook, open the message (not in your preview pane) and then right click somewhere inside the message body and choose "View Source"

Copy and paste a short version of the mail message your trying to send.

0 comments:

Post a Comment