Solved

Sending Email to Multiple Email Addresses (Textbox)

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

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Suggested Solutions

Hello, all! I just recently started using Microsoft's IIS 7.5 within Windows 7, as I just downloaded and installed the 90 day trial of Windows 7. (Got to love Microsoft for allowing 90 days) The main reason for downloading and testing Windows 7 is t…
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…
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…
This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're looking for how to monitor bandwidth using netflow or packet s…

706 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

18 Experts available now in Live!

Get 1:1 Help Now