Wrox Programmer Forums
|
Classic ASP Components Discussions specific to components in ASP 3.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Classic ASP Components section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old March 25th, 2005, 06:53 PM
Authorized User
 
Join Date: Dec 2004
Posts: 23
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via ICQ to datagram Send a message via AIM to datagram
Default Sendmail

How do I format this so that I can have this script mail to 2 addresses?? The mailto: isnt working with 2 email addresses in there. Only the 1st email address gets the email. Help! =(


Dim from As String = TextBox2.Text
Dim mailto As String = "blah@blah.com, moo@moo.com"
Dim subject As String = "TEST"
Dim body As String = TextBox1.Text & vbCrLf & TextBox2.Text
SmtpMail.SmtpServer = "blah.blah.local"
SmtpMail.Send(from, mailto, subject, body)

 
Old March 28th, 2005, 12:48 AM
Friend of Wrox
 
Join Date: Jul 2004
Posts: 345
Thanks: 0
Thanked 1 Time in 1 Post
Send a message via MSN to gokul_blr Send a message via Yahoo to gokul_blr
Default

Can you try with ; instead of ,


Gokulan Ethiraj
 
Old March 28th, 2005, 12:56 AM
Friend of Wrox
 
Join Date: Jul 2004
Posts: 345
Thanks: 0
Thanked 1 Time in 1 Post
Send a message via MSN to gokul_blr Send a message via Yahoo to gokul_blr
Default

Dim mail As New MailMessage()
mail.To = "me@mycompany.com;him@hiscompany.com;her@hercompan y.com"
mail.From = "you@yourcompany.com"
mail.Subject = "this is a test email."
mail.Body = "this is my test email body."
SmtpMail.SmtpServer = "localhost" 'your real server goes here
SmtpMail.Send(mail)

Gokulan Ethiraj
 
Old March 28th, 2005, 11:06 AM
Authorized User
 
Join Date: Dec 2004
Posts: 23
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via ICQ to datagram Send a message via AIM to datagram
Default

It still doesnt work with the ";", I get an error that crashes the whole page. It says: Server Error in 'intranet/forms' application.
Runtime Error

 
Old April 10th, 2005, 11:01 AM
Authorized User
 
Join Date: Apr 2005
Posts: 16
Thanks: 0
Thanked 0 Times in 0 Posts
Default

hi

don't know, whild quest - is there not a mail.cc aspect to smtpmail?

Helga Anagnostopoulos
 
Old April 10th, 2005, 06:26 PM
Friend of Wrox
 
Join Date: Jan 2004
Posts: 1,870
Thanks: 12
Thanked 20 Times in 20 Posts
Send a message via AIM to mat41
Default

;;;is there not a mail.cc aspect to smtpmail?
There are different mail methods available to you (CDO, CDONTS etc) - they use the smtp service. To answer your question, yes there is a cc option:

http://www.troutflap.clara.net/Attac...ypages/CDO.htm

Wind is your friend
Matt





Similar Threads
Thread Thread Starter Forum Replies Last Post
Using Sendmail.php How shall i? vinu123 BOOK: Beginning PHP5, Apache, and MySQL Web Development ISBN: 978-0-7645-7966-0 1 January 5th, 2007 03:22 AM
SendMail Problem bahachin Excel VBA 0 November 22nd, 2006 09:45 AM
Sendmail datagram Classic ASP Components 4 March 8th, 2005 08:21 AM
Using Session value in Sendmail Prabhakar_dt Classic ASP Basics 5 September 18th, 2004 08:28 PM
Using SendMail over ASP Paleo Classic ASP Components 1 July 29th, 2003 01:45 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.