Solved

Sending Email to Multiple Email Addresses (Textbox)

Posted on 2004-04-05
2
315 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

Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Prevent URL from printing on header 5 70
VBScript FormatCurrency - how to change the currency symbol 4 46
Select distinct 25 98
Microsoft SQL ADO Conn Issue 6 46
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 …
I was asked about the differences between classic ASP and ASP.NET, so let me put them down here, for reference: Let's make the introductions... Classic ASP was launched by Microsoft in 1998 and dynamically generate web pages upon user interact…
This Micro Tutorial will teach you how to censor certain areas of your screen. The example in this video will show a little boy's face being blurred. This will be demonstrated using Adobe Premiere Pro CS6.
Windows 10 is mostly good. However the one thing that annoys me is how many clicks you have to do to dial a VPN connection. You have to go to settings from the start menu, (2 clicks), Network and Internet (1 click), Click VPN (another click) then fi…

776 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