Solved

Sending Email to Multiple Email Addresses (Textbox)

Posted on 2004-04-05
2
314 Views
Last Modified: 2008-03-06
I would like to know how to send an email out to mulitple email address that are specified inside a textbox tag.

For example:

greg@somewhere.com
mary@microsoft.com
joe@someplace.net

In the <textbox> each email address is on a separate line.

Can anyone help me with this?

Thank you,
-Greg
0
Comment
Question by:greddin
2 Comments
 
LVL 4

Accepted Solution

by:
dukestaTAI earned 500 total points
ID: 10759680
Make a form with text box called message and a textbox called recipients

<!--METADATA TYPE="typelib" UUID="CD000000-8B95-11D1-82DB-00C04FB1625D" NAME="CDO for Windows 2000 Type Library" -->
<!--METADATA TYPE="typelib" UUID="00000205-0000-0010-8000-00AA006D2EA4" NAME="ADODB Type Library" -->

<%@ Language=VBScript %>

<HTML>
<BODY>
<%
Dim strHTML
DIM iMsg, Flds, iConf

Set iMsg = CreateObject("CDO.Message")
Set iConf = CreateObject("CDO.Configuration")
Set Flds = iConf.Fields

Flds(cdoSendUsingMethod) = cdoSendUsingPort
Flds(cdoSMTPServer) = "127.0.0.1"
Flds(cdoSMTPServerPort) = 25
Flds(cdoSMTPAuthenticate) = cdoAnonymous ' 0
Flds.Update

strHTML = "<HTML>"
strHTML = strHTML & "<HEAD>"
strHTML = strHTML & "<BODY>"
strHTML = strHTML & "<Table>"
strHTML = strHTML & "<td><b> This is a request from a Client</b><br><br><br></td><tr>"
strHTML = strHTML & "<td><b>Message:</b></td><td>&nbsp;&nbsp;" & Request.Form("frmMessage") & "</td>
strHTML = strHTML & "</Table>"
strHTML = strHTML & "</BODY>"
strHTML = strHTML & "</HTML>"

With iMsg
Set .Configuration = iConf
.To = "" & Replace(Request.Form("Recipients"), "vbcrlf", ", ") & ""
.From = "Client@YOURDOMAIN"
.Subject = "This is a request from a Client"
.HTMLBody = strHTML
.Send
End With

Set iMsg = Nothing
Set iConf = Nothing
Set Flds = Nothing

Response.Redirect "email.asp"

%>


</BODY>
</HTML>
0
 

Author Comment

by:greddin
ID: 10760052
Thanks for your help!
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Classic ASP - cannot find folder on the server 5 31
C# onclick function to call another form with parameter 10 54
Update table value with join syntax 2 59
Pass through dll 2 62
I have helped a lot of people on EE with their coding sources and have enjoyed near about every minute of it. Sometimes it can get a little tedious but it is always a challenge and the one thing that I always say is:  The Exchange of information …
This demonstration started out as a follow up to some recently posted questions on the subject of logging in: http://www.experts-exchange.com/Programming/Languages/Scripting/JavaScript/Q_28634665.html and http://www.experts-exchange.com/Programming/…
I designed this idea while studying technology in the classroom.  This is a semester long project.  Students are asked to take photographs on a specific topic which they find meaningful, it can be a place or situation such as travel or homelessness.…
Concerto provides fully managed cloud services and the expertise to provide an easy and reliable route to the cloud. Our best-in-class solutions help you address the toughest IT challenges, find new efficiencies and deliver the best application expe…

948 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now