close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

Sending Attahcments from form

Thread began 8/17/2009 4:35 am by Jaffa | Last modified 8/17/2009 10:24 am by Jaffa | 1615 views | 1 replies

Jaffa

Sending Attahcments from form

Hi i'm trying to have my form send 4 attachments that have been selected from the users PC via the usual file field element and have them sent to an elected email address, I receive the usual form elements but no attachments.

Can you please explain how to do this in the current version of UE.

Cheers.

<?php
$MailAttachments = "";
$MailBCC = "";
$MailCC = "";
$MailTo = "";
$MailBodyFormat = "";
$MailBody = "";
$MailImportance = "";
$MailFrom = "".((isset($_POST["Name"]))?$_POST["Name"]:"") ."|WA|".((isset($_POST["Email"]))?$_POST["Email"]:"") ."";
$MailSubject = "App Forms";
$_SERVER["QUERY_STRING"] = "";

//Global Variables

$WA_MailObject = WAUE_Definition("mail.xxxxxxxxx.com.au","25","youremailaddress@yourmailserver.com","","","");

if ($RecipientEmail) {
$WA_MailObject = WAUE_AddRecipient($WA_MailObject,$RecipientEmail);
}
else {
//To Entries
}

//Attachment Entries
$WA_MailObject = WAUE_AddAttachment($WA_MailObject,"".((isset($_FILES["Form1"]))?$_FILES["Form1"]["name"]:"") ."");
$WA_MailObject = WAUE_AddAttachment($WA_MailObject,"".((isset($_FILES["Form2"]))?$_FILES["Form2"]["name"]:"") ."");
$WA_MailObject = WAUE_AddAttachment($WA_MailObject,"".((isset($_FILES["Form3"]))?$_FILES["Form3"]["name"]:"") ."");
$WA_MailObject = WAUE_AddAttachment($WA_MailObject,"".((isset($_FILES["Form4"]))?$_FILES["Form4"]["name"]:"") ."");

//BCC Entries

//CC Entries

//Body Format
$WA_MailObject = WAUE_BodyFormat($WA_MailObject,0);

//Set Importance
$WA_MailObject = WAUE_SetImportance($WA_MailObject,"3");

//Start Mail Body
$MailBody = $MailBody . "<html><head></head><body>";
$MailBody = $MailBody . ((isset($_POST["Name"]))?$_POST["Name"]:"");
$MailBody = $MailBody . "\r\n";
$MailBody = $MailBody . "<p>";
$MailBody = $MailBody . ((isset($_POST["Tel"]))?$_POST["Tel"]:"");
$MailBody = $MailBody . "</p>\r\n";
$MailBody = $MailBody . "<p>";
$MailBody = $MailBody . ((isset($_POST["Email"]))?$_POST["Email"]:"");
$MailBody = $MailBody . "</p>\r\n";
$MailBody = $MailBody . "<p>";
$MailBody = $MailBody . ((isset($_FILES["Form1"]))?$_FILES["Form1"]["name"]:"");
$MailBody = $MailBody . "</p>\r\n";
$MailBody = $MailBody . "<p>";
$MailBody = $MailBody . ((isset($_FILES["Form2"]))?$_FILES["Form2"]["name"]:"");
$MailBody = $MailBody . "</p>\r\n";
$MailBody = $MailBody . "<p>";
$MailBody = $MailBody . ((isset($_FILES["Form3"]))?$_FILES["Form3"]["name"]:"");
$MailBody = $MailBody . "</p>\r\n";
$MailBody = $MailBody . "<p>";
$MailBody = $MailBody . ((isset($_FILES["Form4"]))?$_FILES["Form4"]["name"]:"");
$MailBody = $MailBody . "</p>\r\n";
$MailBody = $MailBody . "</body></html>";
//End Mail Body

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

$WA_MailObject = null;
?>

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...