email attachment

Results 1 to 2 of 2

Thread: email attachment

  1. #1
    zia Guest

    Default email attachment

    In the below email function I am calling the sendmail<BR>function from an ASP file & its working.<BR>But what I wanna know is that if I want to include an<BR>attachment in the body what should I add in the code.<BR>Below is the code<BR><BR>&#060;%<BR>function sendmail(from,fromname,remail,rname,cc,bcc,html,su bject,msg)<BR>dim mail<BR><BR>Set Mail = Server.CreateObject("Persits.MailSender")<BR>Mail. Host = "" &#039; Specify a valid SMTP server<BR> <BR> Mail.From = from<BR> <BR> if not fromname="" then<BR> Mail.FromName = fromname &#039; Specify sender&#039;s name<BR> end if<BR> <BR> Mail.AddAddress remail,rname<BR> <BR> if not cc="" then<BR> Mail.AddCC cc<BR> end if<BR> <BR> if not bcc="" then<BR> Mail.AddBCC bcc<BR> end if<BR> <BR> if html="h" then<BR> Mail.IsHTML=True &#039;To send the email as HTML in the body&#039;<BR> else<BR> Mail.IsHTML=False<BR> end if<BR> <BR> Mail.Subject = subject<BR> <BR> Mail.Body =msg <BR> <BR> dim mailsuccess<BR> mailsuccess=Mail.Send()<BR><BR>set Mail=nothing<BR>end function<BR>%&#062; <BR>

  2. #2

    Default RE: email attachment

    You need to use a specific method of your email object to allow it to ATTACH files to the email - body text is completely separate - look at your mail componment&#039;s documentation

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts