Wrox Home  
Search P2P Archive for: Go

  Return to Index  

asp_cdo thread: Multiple mail attachments


Message #1 by "Pat Waddington" <paw@s...> on Thu, 11 Oct 2001 07:50:23 +0100

Is it possible to attach more than one file to an email generated using 

CDONTS?



I can't find anything in the documentation, so an answer to this 

question (and if yes - what's the syntax?) would be much appreciated.



Thank you

Pat



Message #2 by "Martin Grundy" <martin.grundy@s...> on Thu, 11 Oct 2001 12:32:53

Yes, it is possible to attach more than one file to an email generated 

using CDONTS.



All you do is repeat the AttachFile line:



set myMail = Server.CreateObject("CDONTS.NewMail")

myMail.From = mailfrom

myMail.To = mailto

myMail.Cc = mailfrom

myMail.subject = mailsubject

myMail.BodyFormat = 0

myMail.MailFormat = 0

myMail.Body = mailtext

myMail.AttachFile FullSpec1, FileName1

myMail.AttachFile FullSpec2, FileName2

myMail.Send

set myMail = Nothing

Message #3 by "Pat Waddington" <paw@s...> on Thu, 11 Oct 2001 20:08:21 +0100
Many thanks



Pat

----- Original Message ----- 

From: "Martin Grundy" <martin.grundy@s...>

To: "ASP CDO" <asp_cdo@p...>

Sent: Thursday, October 11, 2001 12:32 PM

Subject: [asp_cdo] Re: Multiple mail attachments





> 

> Yes, it is possible to attach more than one file to an email generated 

> using CDONTS.

> 

> All you do is repeat the AttachFile line:

> 

> set myMail = Server.CreateObject("CDONTS.NewMail")

> myMail.From = mailfrom

> myMail.To = mailto

> myMail.Cc = mailfrom

> myMail.subject = mailsubject

> myMail.BodyFormat = 0

> myMail.MailFormat = 0

> myMail.Body = mailtext

> myMail.AttachFile FullSpec1, FileName1

> myMail.AttachFile FullSpec2, FileName2

> myMail.Send

> set myMail = Nothing

  Return to Index