Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Sending Email to Multiple Email Addresses (Textbox)

Posted on 2004-04-05
2
Medium Priority
?
328 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 2000 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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

I would like to start this tip/trick by saying Thank You, to all who said that this could not be done, as it forced me to make sure that it could be accomplished. :) To start, I want to make sure everyone understands the importance of utilizing p…
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…
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an anti-spam), the admin…
We’ve all felt that sense of false security before—locking down external access to a database or component and feeling like we’ve done all we need to do to secure company data. But that feeling is fleeting. Attacks these days can happen in many w…
Suggested Courses

963 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