close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

Universal Email file attachment problem

Thread began 9/04/2009 3:35 am by steen120697 | Last modified 9/08/2009 3:16 pm by steen120697 | 3378 views | 7 replies

steen120697

This is the code. I'm now using server.mappath. I have 3 files; they work individually but I cannot send 2 or more files at the same time...

<%
Dim Recordset1
Dim Recordset1_numRows

Set Recordset1 = Server.CreateObject("ADODB.Recordset")
Recordset1.ActiveConnection = MM_dbburner_STRING
Recordset1.Source = "SELECT * FROM LOGBOG where keycode = '" & keycode & "' and email = '" & email & "'"
response.write(Recordset1.Source)
Recordset1.CursorType = 0
Recordset1.CursorLocation = 2
Recordset1.LockType = 1
Recordset1.Open()

Recordset1_numRows = 0
%>
<!--#include file="../WA_Universal_Email/AspMail_VB.asp" -->
<!--#include file="../WA_Universal_Email/MailFormatting_VB.asp" -->
<%
function WA_Universal_Email_1_SendMail(RecipientEmail)
dim MailObject, MailAttachments, MailBCC, MailCC, MailTo, MailBodyFormat, MailBody, MailImportance, MailFrom, MailSubject
MailAttachments = ""
MailBCC = ""
MailCC = ""
MailTo = ""
MailBodyFormat = ""
MailBody = ""
MailImportance = ""
MailFrom = "John Doe|WA|john@domain.com"
MailSubject = "Photos"

'Global Variables
gBodyFormat = ""

set WA_MailObject = WAUE_Definition("smtp.domain.dk")

if (RecipientEmail <> "") then
set WA_MailObject = WAUE_AddRecipient(WA_MailObject,RecipientEmail)
else
'To Entries
end if

'Attachment Entries
while (NOT Recordset1.EOF)
set WA_MailObject = WAUE_AddAttachment(WA_MailObject,"" & cStr(Server.MapPath((Recordset1.Fields.Item("file2send")). Value)) & "")
Recordset1.MoveNext()
wend
if (Recordset1.CursorType > 0) then
Recordset1.MoveFirst
else
Recordset1.Requery
end if

'BCC Entries

'CC Entries

'Character Set

'Body Format
set WA_MailObject = WAUE_BodyFormat(WA_MailObject,0)
MailBodyFormat = gBodyFormat

'Set Importance
set WA_MailObject = WAUE_SetImportance(WA_MailObject,"3")

'Start Mail Body
MailBody = MailBody & "Cool"
'End Mail Body

set WA_MailObject = WAUE_SendMail(WA_MailObject,MailAttachments,MailBCC,MailCC,MailTo,MailImportance,MailFrom,MailSubject,MailBody)

set WA_MailObject = nothing
end function
%>

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question

Content

rating

Layout

rating

Ease of use

rating

security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...