Problem sending Multiple Attachments w/Email

This is a discussion on "Problem sending Multiple Attachments w/Email" within the Classic ASP section. This forum, and the thread "Problem sending Multiple Attachments w/Email are both part of the Program Your Website category.


 Subscribe in a reader

Go Back   Webforumz.com > Main Forums > Program Your Website > Classic ASP

Notices




Reply
 
LinkBack Thread Tools
  #1  
Old Aug 9th, 2007, 19:50
New Member
Join Date: Apr 2006
Location: ILLINOIS
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
Problem sending Multiple Attachments w/Email

I have created an application which allows a user to upload an attachment and when finished, it sends an email with the attachment. That works fine. I've even gotten it to allow the user to upload multiple attachments. However I cannot get it to send more than one attachment with email. It only attaches the last one [i.e. if they upload 3, only the third attachment is sent. I need some help. Here's the code for the email...

Code: Select all
Dim Jmail
Dim Attachment
Dim ClearAttachments
Dim Attachments
Set JMail = Server.CreateObject("JMail.SMTPMail")
JMail.ServerAddress = "MAILSERVER"
Jmail.AddRecipient("CylPriceList@parker.com")
Jmail.AddRecipientBCC Session("CustEmail")
Jmail.Sender = Session("CustEmail")
Jmail.SenderName ="Quote Requestor"
Jmail.Subject = "Quote Request"
Jmail.Priority = 1
Jmail.Body = MailBody
set session("BuildPath")= attachment
set attachment = objUpload.files("attachment")

if attachment.IsFile then        I've tried this code
    msg.AddCustomAttachment attachment.filename, attachment.item, false
end if
               and this code...but I'm missing something
FOR Each item in objUpload.files
    If attachment  <> "" then 
    set attachment = objUpload.files
    Jmail.AddAttachment objUpload.files.Item
    end if
next


    Jmail.Silent = false
    Jmail.Execute

session("BuildPath")  = ""

end function
If anyone out there has any idea of what's wrong, please help. Thanks.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote

Reply

Tags
attachment, multiple

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
PHP email form not sending email Kurt PHP Forum 1 Oct 12th, 2007 04:26
sending email arrays with php ppgpilot PHP Forum 2 Jan 25th, 2007 16:49
Sending Email Paul00000001 JavaScript Forum 3 Jul 29th, 2006 03:16
Sending email Paul00000001 PHP Forum 6 Jul 10th, 2006 11:49
sending multiple mails hytechpro PHP Forum 1 Sep 26th, 2005 14:49


All times are GMT. The time now is 14:09.


Powered by vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0 RC8
© 2003-2008 Webforumz.com : All Rights Reserved

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42