• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 707
  • Last Modified:

Sending Bulk email

Hi.I'm not sure if this question's being asked before by anyone here,as I'm kinda new to EE(just joined yesterday), but here's my question.

I need to send bulk email to a lot of people whose records are stored in SQL Server 7. This lot of people is be divided into severaL groups. I need to select which group of people to send the mail to using drop down lists. Also when I compose the message, I need to consolidate the email addresses of a group into one single identity address, so instead of displaying several hundred email addresses in the form, I can display only a few identities.Another thing, when the bulk email is sent out, it has to be in BCC,meaning that instead of using "TO" to send out the mail,I use "BCC".

Please help,as I'm kinda new to ASP and this question of mine is killing me.Thanks in advance to all of you.

PS,not really sure if this question is worth the amount of points I'm giving,so do forgive me.
0
segafreak
Asked:
segafreak
  • 25
  • 12
  • 8
  • +5
1 Solution
 
djbusychildCommented:
You could using the component that comes with IIS, but other free components like aspemail will suite your bulk email needs better. http://www.aspemail.com/
0
 
kahleanCommented:
try this link to find out how to send bulk email by reering to the email add in your database. it can work on all platfrom from win 95, 98 me, nt as well 2000. It uses a command call cscript which is found in every pc


http://www.siteexperts.com/tips/backend/ts12/page1.asp
0
 
weesiongCommented:
kahlean,

I have view the page you link, it is using CDONTS Mail, and it just can work in NT4.0 or NT2000 only, with SMTP Exchange Server. :p

Regards,
Wee Siong
0
Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

 
kahleanCommented:
weesiong thanks for the correction. i overlook this matter. If fact if you have win2k you can set up a IISserver and it has a SMTP server
0
 
segafreakAuthor Commented:
Oh yah..I forgot to add.I'm using Win2000 Advanced Server as my platform.
Btw,what is SMTP Exchange Server?
0
 
segafreakAuthor Commented:
Oh yah..I forgot to add.I'm using Win2000 Advanced Server as my platform.
Btw,what is SMTP Exchange Server?
0
 
narin717Commented:

Please try this.
http://www.serverobjects.com/products.htm#aspmail
http://www.serverobjects.com/comp/Aspmail4.htm

It's ASPMail.It's easy to use it to send email by ASP.
You can add BCC by following below code.

Mailer.AddRecipient "name1", "address1"
Mailer.AddRecipient "name2", "address2"
Mailer.AddBCC "name3", "address3"
0
 
weesiongCommented:
segafreak,

CDONTS it is a Method in Exchange server http://www.microsoft.com/exchange/default.asp, i think using this component can send a lot mail :p

Regards,
Wee Siong
0
 
Michel SakrCommented:
For bulk emailing you'll need to write a vb program since asp isn't meant for that.. anyways in both (asp or vb) you can use a component to mail.. cdonts is somehow slow and don't have the BCC (if I recall correctly)


How do I send e-mail from ASP?

There are several components that enable you to do this. You may already have one, if you have an SMTP server installed alongside IIS - it's called CDONTS. Here is the documentation and an article for CDONTS:
 
    http://msdn.microsoft.com/library/psdk/cdo/_denali_newmail_object_cdonts_library_.htm 
    http://www.aspfaq.com/faq/faqShow.asp?fid=49 
 
There are also several other components available (if I missed any, let us know)
 
    Genusa's AspMail
    http://www.serverobjects.com/products.htm#Aspmail 
 
    ASPEmail
    http://www.aspemail.com/ 
 
    Dundas Mailer
    http://www.dundas.com/index.asp?/products/mailer 
 
    MailListBot
    http://www.MailListBot.com/ 
 
    EasyMail
    http://www.easymailobjects.com/emobjects/smtp.asp 
 
    w3 Jmail
    http://www.dimac.net/ 
 
    HTMLMailer / HTMLMailerPlus
    http://www.oopadelic.com/htmlmailer/ 
    http://www.oopadelic.com/htmlmailerplus/ 
 
    DevMailer
    http://www.geocel.com/devmailer/ 
 
    VSEmail
    http://www.vsoft-tech.com.au/vsemail/readme.html 
 
    Mabry Mail
    http://www.mabry.com/mail/index.htm 
 
    NNTPClient+SMTPClient
    http://www.liquidcool.com/asp 
 
    SimpleMail
    http://www.adiscon.com/SimpleMail 
 
    AB Active X Mailer
    http://www.geocities.com/ResearchTriangle/2656/abmailer.html 
 
    OCXMail
    http://www.flicks.com/aspmail/ 
 
    WindMail
    http://www.geocel.com/windmail/ 
 
    Zaks.POP3
    http://www.zaks.demon.co.uk/code/cpts/pop/index.html 


How do I send e-mail with CDONTS?

To send an e-mail with Active Server Pages requires some kind of component. There are many third party components available (see bottom of page), but one of the most readily available is the free Microsoft mail component CDONTS, which ships with the Option Pack for WinNT 4.0.
 
Now, once you stop trying to comprehend it's name (I know I can't), it is quite a simple mail program to use once you set it up.
 
CDO works by using the SMTP service in IIS, unless Exchange is installed, then it will just use Exchange's SMTP system. Before continuing, make sure you have your SMTP service properly set up. You can check by using the Microsoft Management Consol (MMC), or you can look to see if CDONTS.DLL is in your system32 directory.
 
To send e-mail from ASP, all you have to do is define the object and use the ".send" function.
 
<%
    Set MailObj = Server.CreateObject("CDONTS.NewMail")
    MailObj.Send "from@me.com", "to@me.com", "My Subject", "My Text"
%>
 
 
Wasn't that easy?
 
---------------------
Sending an Attachment
---------------------
 
Another very commonly used function of CDO is to send attachments with an e-mail.
 
<%
    Set MailObject = Server.CreateObject("CDONTS.NewMail")
    att_file="c:attachmentsStandardPolicy.txt"
    f_name="Policy.txt"
    MailObject.From="from@me.com"
    MailObject.To="to@me.com"
    MailObject.Subject="Subject Text Here"
    MailObject.Body="Body Text Here"
    MailObject.AttachFile att_file,f_name
    MailObject.Send
%>
 
 
Along with CDO, there are many third party components that can also be used for sending e-mail. Many of them have more features than CDO. You might want to have a look at:
 
    http://www.aspfaq.com/faq/faqShow.asp?fid=29 
 
If you get "Permission Denied" errors, see the following KB article:
 
    http://support.microsoft.com/support/kb/articles/Q228/4/65.asp 
 

0
 
kahleanCommented:
segafreak, if you are using win2000 advance server, the link to sample code is what you are looking, i have implemented this code on my simple newsletter application. and it works fine. In win2000 advance there is a component called internet information service (IIS) which consist of personal web server, smtp server, and ftp server. A smtp server is need configure your server in sending email

0
 
segafreakAuthor Commented:
Regarding this question,I have to put it on hold for a couple of weeks.Apologies to those who took their time to answer this question,reason being I do not have a SMTP server on hand now,I'll get one in a couple of weeks.Right now I'm racking my brain over how to perform an SQL Insert starement in asp for Access DB...doesn't seem to be going right,even though it seems right...sigh...
0
 
weesiongCommented:
segafreak,

If you are no SMTP server in your server now, nevermind, install the component Silves5 said.

Regards,
Wee Siong
0
 
segafreakAuthor Commented:
Ok,I'm back to this qn.

And I'm wondering.I want to include the person's name in the email message body,instead of using something like "Hi all".How do I do this?The person's name and email are consolidated into one identity together with many others in the BCC line.The email addresses and names are pulled form the database.And I want to put only the name of the person I'm sending to in the body of the email(meaning personalised email).

Can anyone help?
0
 
kahleanCommented:
if you can pull the email name from the database, you can pull out the the name using query as well just append at the following.

objMail.subject = subjectString & UserName
0
 
Michel SakrCommented:
No BCC in CDONTs AFAIK..
0
 
segafreakAuthor Commented:
ok,I've installed aspemail.

anyone can provide me with a sample code on how to send personalised email using aspemail?

btw,will I need an external SMTP server?
0
 
Michel SakrCommented:
>btw,will I need an external SMTP server?

no  , you need an active email smtp account located anywhere on the web.. the component will act as a mail client in the point of view of the mail server.

Samples are available on the aspemail website!

0
 
Michel SakrCommented:
0
 
narin717Commented:
Set Mailer = Server.CreateObject("Persits.MailSender")
     Mailer.FromName   = "vMail Asia"
     Mailer.From = "your name"
     Mailer.Host = "smtp.mail.com"
     Mailer.AddAddress Email,FName
     Mailer.Subject    = "Your password"
     Mailer.BodyText   = "Your login name is "&FName&
              " password is " & iPassword & "."
                   
     Mailer.Send
     if err.number <> 0 then
       response.write (err.description)
     end if
Set Mailer = nothing

0
 
narin717Commented:
Set Mailer = Server.CreateObject("Persits.MailSender")
     Mailer.FromName   = "yourname"
     Mailer.FromAddress = "yourname@yourhost.com"
     Mailer.Host = "smtp.mail.com"
     Mailer.AddAddress Email,FName
     Mailer.Subject    = "Your password"
     Mailer.BodyText   = "Your login name is "&FName&
              " password is " & iPassword & "."
                   
     Mailer.Send
     if err.number <> 0 then
       response.write (err.description)
     end if
Set Mailer = nothing

0
 
Michel SakrCommented:
duplicating my comments..
0
 
segafreakAuthor Commented:
erm can u guys tell me which is more efficient?
1)Sending each email individually(uisng CDONTs)
2)Using Bcc to send out all the emails(using AspEmail)

The number of people to send the mail to can be a very large number.
0
 
kahleanCommented:
i will definately go for cdonts....
0
 
weesiongCommented:
Yes, me too, choose CDONTS.

A result because it faster then other component. but it look like less function, as like Encrypt Mail and ....

Regards,
Wee Siong
0
 
segafreakAuthor Commented:
OK,thanks,gonna try CDONTs.

Btw,will I need an external SMTP server for CDONTs?If not,how do I configure the smtp server I already have?
0
 
Michel SakrCommented:
in cdonts you can add several emails in the to field using the semicolumn ; between each email address.. sertting the smtp is easy and well documented in NT
0
 
weesiongCommented:
segafreak,

You can install Exchange Server: http://www.microsoft.com/exchange

Regards,
Wee Siong
0
 
segafreakAuthor Commented:
Ok,my supervisor wants me to use the SMTP server in IIS.Anyone knows how to use/configure it???I need it asap.Thanks
0
 
weesiongCommented:
segafreak,

You are using Win2k or WinNT4.0? If Win2k, when installed it will add an SMTP Server in your Win2k

Try, telnet:
Start Button ---> Run ---> Telnet ---> Hostname = your server IP, Port = 25 (SMTP port)

Regards,
Wee Siong
0
 
segafreakAuthor Commented:
I'm using Windows 2000 Adv Server.

Erm,how to telnet??
0
 
segafreakAuthor Commented:
I know there's an SMTP server with IIS.Problem is how to use it in sending out email.
0
 
weesiongCommented:
segafreak,

Sample code:

<%

FromWho = Request("FromWho")
ToWho = Request("ToWho")
Subject = Request("Subject")
Body = Request("Body")
Dim myMail, FileAttach

Set myMail = CreateObject("CDONTS.NewMail")
myMail.From = FromWho
myMail.To = ToWho
myMail.Subject = Subject
myMail.Body = Body
myMail.Send
Set myMail = Nothing

%>

Regards,
Wee Siong
0
 
segafreakAuthor Commented:
Not sure whether the SMTP is sending out the email or not.Anyway,here's my code.Is it correct?

While Not rs1.EOF
               'Create an instance of the CDO object.
                Set objMail = server.CreateObject("CDONTS.NewMail")
                'set its properties
                objMail.From = "Administrator<nyp@nyp.edu.sg>"
                objMail.To = rs1("eEmailAdd")
                userBody = ("Dear " & rs1("eName"))
                strBody = strBody & userBody & vbCrLf & vbCrLf & strMsgBody  'the name of the person will be added to the front of the message
                'Response.write strBody
                objMail.Subject = strSubject
                objMail.Body = strBody    
                'send the mail
                objMail.Send
                'set the object = nothing
                set objMail = Nothing
                'confirm to the user that the mail has been sent
                Response.write "<div align='center'>Message sent to " & rs1("eName") & "!</div><br>"
                'go to the next record
                rs1.movenext
           WEND
0
 
weesiongCommented:
segafreak,

No problem with the code, so it got
Response.Write this the line?
"<div align='center'>Message sent to " & rs1("eName") & "!</div><br>"

Regards,
Wee Siong
0
 
segafreakAuthor Commented:
Yeah.

The problem is not sure whether the emails are sent out or not.If this is the case,then it's the SMTP.I still don't really know how to configure it.
0
 
weesiongCommented:
segafreak,

Actually i also got this problem, and haven't fix it.....
I have 2 Win2k server in here, 1 is gateway server, 1 is intranet server, and both link to the net.

But in my gateway server it can send out the mail, but intranet server canot do it, i havent try to fix the problem, maybe after install Exchange Server it can be work, but now, i am lazy to do it :)

This is my idea, you can try :)
I think you are from singapore, right?

Regards,
Wee Siong
0
 
segafreakAuthor Commented:
Yeah,I'm from Singapore.Currently a student doing project at Nanyang Poly....

I'm not sure whether your problem is the same as mine.My supervisor wnats me to use the SMTP server in IIS,so no choice.
0
 
weesiongCommented:
segafreak,

My supervisor ?


Are you try install the Exchange Server? and your Server maybe as like my server here, is in intranet server, no internet server.

Regards,
Wee Siong
0
 
segafreakAuthor Commented:
Yeah,my project supervisor..

Er,not too sure bout the type of server.Win2k server is installed on my computer and every computer is networked together in a LAN,so I think,yeah,maybe it's a intranet server.
But also my supervisor made a request to the network administrator to allow me to use the SMTP services,so I don't really know now...I'll speak to my supervisor again soon.
0
 
weesiongCommented:
Okies  :)

Regards,
Wee Siong
0
 
segafreakAuthor Commented:
Oh yeah.I forgot about the CC part.
Is it possible to have two instances of the CDO object in asp??Cos besides having to send the individual emails out,I need to send CC mails to the email addresses specified in the CC text field.

0
 
segafreakAuthor Commented:
0
 
segafreakAuthor Commented:
0
 
segafreakAuthor Commented:
0
 
segafreakAuthor Commented:
0
 
caraf_gCommented:
test
0
 
weesiongCommented:
segafreak,

myMail.CC = "user1@company1.com;user2@company2.com;user3@company3.com"

Regards,
Wee Siong
0
 
caraf_gCommented:
or test
0
 
segafreakAuthor Commented:
ok i guess i'll post up my code...the email's finally working,but there's a bug.When I include an email add under CC,the person receiving CC mail will get several looped messages in one email...
While Not rs1.EOF
               'Create an instance of the CDO object.
                Set objMail = server.CreateObject("CDONTS.NewMail")
                'set its properties
                objMail.From = "Administrator<nyp@nyp.edu.sg>"
                objMail.To = rs1("eEmailAdd")
                userBody = ("Dear " & rs1("eName"))
                strBody = strBody & userBody & vbCrLf & vbCrLf & strMsgBody  'the name of the person will be added to the front of the message
                'Response.write strBody
                objMail.Subject = strSubject
                objMail.Body = strBody    
                'send the mail
                objMail.Send
                'set the object = nothing
                set objMail = Nothing
                'confirm to the user that the mail has been sent
                Response.write "<div align='center'>Message sent to " & rs1("eName") & "!</div><br>"
                'go to the next record
                rs1.movenext
           WEND
     
%>

<%
     If valid = "true" then
          If not strCc = "" then
                Set objMail2 = server.CreateObject("CDONTS.NewMail")
               objMail2.From = "Administrator<nyp@nyp.edu.sg>"
                objMail2.Cc = strCc
                userBody = "Dear Sir/Madam"
                strBody = strBody & userBody & vbCrLf & vbCrLf & strMsgBody  'the name of the person will be added to the front of the message
                'Response.write strBody
                objMail2.Subject = strSubject
                objMail2.Body = strBody    
                'send the mail
                objMail2.Send
                'set the object = nothing
                set objMail2 = Nothing
                'confirm to the user that the mail has been sent
                Response.write "<div align='center'>Message sent to " & strCc & "!</div><br>"
           End If
      End If
 
%>
0
 
segafreakAuthor Commented:
any response???I'm still having problems with this bug of mine.
0
 
segafreakAuthor Commented:
any response???I'm still having problems with this bug of mine.
0
 
segafreakAuthor Commented:
any response???I'm still having problems with this bug of mine.
0
 
Michel SakrCommented:
are there any special characters in the mail address? or is it in an incorrect format?

try to use one of the components instead supplied above..
0
 
segafreakAuthor Commented:
special characters??no.except the @,there aren't any special characters..
I even used a differnt object for the CC part..


0
 
segafreakAuthor Commented:
ok i guess I'm finally done with this question.:)
How do I distribute the points??
0
 
Michel SakrCommented:
either split or award the points to an expert and award extra points to other experts by posting questions for expert x...
you can split by posting a 0 point question in the community support asking to distribute the points between the experts you name allocation to each the amount you choose..

http://www.experts-exchange.com/jsp/qList.jsp?ta=commspt

0
 
teacher_modCommented:
To execute the split I have reduce the points to 35 and accepted a comment from weesiong.

I will post additional points for questions for Silvers5, kahlean, and narin717 in this topic area.

teacher_mod
Community Support Moderator
Experts-Exchange
teacher_mod@experts-exchange.com
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Cloud Class® Course: MCSA MCSE Windows Server 2012

This course teaches how to install and configure Windows Server 2012 R2.  It is the first step on your path to becoming a Microsoft Certified Solutions Expert (MCSE).

  • 25
  • 12
  • 8
  • +5
Tackle projects and never again get stuck behind a technical roadblock.
Join Now