ASP Hosting sale!
Double disk space and transfer for FREE!
Limited time offer! Act Now!

aspdev | articles | tutorials | forums

 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Newsletters

 
Post new topic   Reply to topic    ASPdev.org Forum Index -> .NET Programming (ASP.NET, VB.NET, C#)
View previous topic :: View next topic  
Author Message
blueangell



Joined: 31 Jan 2006
Posts: 19

PostPosted: Mon Feb 20, 2006 8:36 am    Post subject: Newsletters Reply with quote

Am i correct in thinking that ASP.NET can be used for a newsletter to be sent out. If so can anyone help me with the code please.

I plan on having 3 colums in my table.
Email
Name
Date

I want to send the newsletter to all the emails in the email colum but im having problems. My friend said to use asp.net for this but i cant suss it out. I want a mass email sending out to them all.
Any help would be appreciated.
Back to top
View user's profile Send private message
paul



Joined: 11 Oct 2004
Posts: 128

PostPosted: Mon Feb 20, 2006 9:49 am    Post subject: Re: Newsletters Reply with quote

blueangell wrote:
Am i correct in thinking that ASP.NET can be used for a newsletter to be sent out. If so can anyone help me with the code please.

I plan on having 3 colums in my table.
Email
Name
Date

I want to send the newsletter to all the emails in the email colum but im having problems. My friend said to use asp.net for this but i cant suss it out. I want a mass email sending out to them all.
Any help would be appreciated.


The first thing you need is to know how to send an email from ASP.NET. Do you already know how to do that?


Thanks,

Paul
_________________
World Countries | Survival Skills
Back to top
View user's profile Send private message
blueangell



Joined: 31 Jan 2006
Posts: 19

PostPosted: Wed Feb 22, 2006 10:58 pm    Post subject: Reply with quote

Not really no. What is the best way to send an e-mail out with ASP?
Back to top
View user's profile Send private message
blueangell



Joined: 31 Jan 2006
Posts: 19

PostPosted: Thu Feb 23, 2006 3:27 pm    Post subject: Reply with quote

I did find this example, please tell me if this is the right way to do it:

Quote:
'Create an instance of the MailMessage class
Dim objMM as New MailMessage()

'Set the properties
objMM.To = "someone@someaddress.com"
objMM.From = "someoneelse@someotheraddress.com"

'If you want to CC this email to someone else...
objMM.Cc = "someone2@someaddress.com"

'If you want to BCC this email to someone else...
objMM.Bcc = "someoneElse@someaddress.com"

'Send the email in text format
objMM.BodyFormat = MailFormat.Text
'(to send HTML format, change MailFormat.Text to MailFormat.Html)

'Set the priority - options are High, Low, and Normal
objMM.Priority = MailPriority.Normal

'Set the subject
objMM.Subject = "Hello there!"

'Set the body - use VbCrLf to insert a carriage return
objMM.Body = "Hi!" & vbCrLf & vbCrLf & "How are you doing?"


Then to send the message:

Quote:
'Now, to send the message, use the Send method of the SmtpMail class
SmtpMail.Send(objMM)
Back to top
View user's profile Send private message
marbles



Joined: 01 Mar 2006
Posts: 16

PostPosted: Wed Mar 29, 2006 6:53 pm    Post subject: Reply with quote

Im assuming you copied this script from somewhere?
You would need the other parts of the script as well, there is probably another external file containing objects etc.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    ASPdev.org Forum Index -> .NET Programming (ASP.NET, VB.NET, C#) All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2002 phpBB Group

SQL Tutorial