close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Attachment from uploaded file not being sent with email

Thread began 10/13/2010 5:00 pm by YellowCircleWeb | Last modified 10/14/2010 12:10 pm by Jason Byrnes | 2427 views | 5 replies |

YellowCircleWeb

Attachment from uploaded file not being sent with email

Hi,

I've spent about an hour reading all the threads about UE4 and attachment problems and none of them seem to match the problem I'm having, hence me starting this new thread.

I've created a form with an email field and a file upload field. I've ensured that the form enctype is mutlitpart/form-data and I'm able to upload the files and receive the test email. However, the attachment doesn't come with the email when I select 'Submitted File' in the attachment settings of UE4. If I choose a static file the attachment comes through with the email.

I've attached my page and the Webassist Pages in the zip file.

I'm completely stumped on this.

Attached Files
ue4-files-and-page.zip
Sign in to reply to this post

Jason ByrnesWebAssist

first off, there is duplicate code on the page that will cause issues.

change:

php:
<?php

// WA_UploadResult1 Params Start
$WA_UploadResult1_Params = array();
// WA_UploadResult1_1 Start
$WA_UploadResult1_Params["WA_UploadResult1_1"] = array(
    
'UploadFolder' => "uploads/",
    
'FileName' => "[FileName]",
    
'DefaultFileName' => "",
    
'ResizeType' => "0",
    
'ResizeWidth' => "0",
    
'ResizeHeight' => "0",
    
'ResizeFillColor' => "" );
// WA_UploadResult1_1 End
// WA_UploadResult1 Params End
?>
<?php?>
<?php
WA_DFP_SetupUploadStatusStruct
("WA_UploadResult1");
if(
$_SERVER["REQUEST_METHOD"] == "POST"){
    
WA_DFP_UploadFiles("WA_UploadResult1""UploadFile""0""""false"$WA_UploadResult1_Params);
}
?>

<?php

// WA_UploadResult1 Params Start
$WA_UploadResult1_Params = array();
// WA_UploadResult1_1 Start
$WA_UploadResult1_Params["WA_UploadResult1_1"] = array(
    
'UploadFolder' => "uploads/",
    
'FileName' => "".((isset($_POST[""]))?$_POST[""]:"")  ."",
    
'DefaultFileName' => "",
    
'ResizeType' => "0",
    
'ResizeWidth' => "0",
    
'ResizeHeight' => "0",
    
'ResizeFillColor' => "" );
// WA_UploadResult1_1 End
// WA_UploadResult1 Params End
?>



to:

php:
<?php

// WA_UploadResult1 Params Start
$WA_UploadResult1_Params = array();
// WA_UploadResult1_1 Start
$WA_UploadResult1_Params["WA_UploadResult1_1"] = array(
    
'UploadFolder' => "uploads/",
    
'FileName' => "[FileName]",
    
'DefaultFileName' => "",
    
'ResizeType' => "0",
    
'ResizeWidth' => "0",
    
'ResizeHeight' => "0",
    
'ResizeFillColor' => "" );
// WA_UploadResult1_1 End
// WA_UploadResult1 Params End
?>
<?php?>
<?php
WA_DFP_SetupUploadStatusStruct
("WA_UploadResult1");
if(
$_SERVER["REQUEST_METHOD"] == "POST"){
    
WA_DFP_UploadFiles("WA_UploadResult1""UploadFile""0""""false"$WA_UploadResult1_Params);
}
?>



second the Submited file option option only works if you do not use the Upload File behavior to upload the file to the server.

Where you are uploading the file, select the entered value option, then click the lightning bolt icon and select the WA Uploaded Files (UploadFile) -> Server Directory variable from the dynamic data bindings.

this will add code similar to:

php:
<?php echo $WA_DFP_UploadStatus["WA_UploadResult1"]["serverDirectory"]; ?>




copy this, then click
the lightning bolt again, this time select the WA Uploaded Files (UploadFile) -> Server File Name variable from the dynamic data bindings.

you will now have code similar to:

php:
<?php echo $WA_DFP_UploadStatus["WA_UploadResult1"]["serverFileName"]; ?>




paste the server directory code before that:

php:
<?php echo $WA_DFP_UploadStatus["WA_UploadResult1"]["serverDirectory"]; ?><?php echo $WA_DFP_UploadStatus["WA_UploadResult1"]["serverFileName"]; ?>




and click ok.

Sign in to reply to this post

YellowCircleWeb

Thanks for the reply Jason. I'll take a look at making these changes and update with post my results.

Sign in to reply to this post

Jason ByrnesWebAssist

you're welcome.

Sign in to reply to this post

YellowCircleWeb

Jason,

I'm happy to say that worked perfectly. Thank you very much for your help. I'm a little confused as to why the option 'submitted file' didn't work though? Can you provide any guidance on that for future use?

Sign in to reply to this post

Jason ByrnesWebAssist

the submitted file will work if you do not use file upload to store it on the server.
The uplaod behavior will process the file sent with the forms FILE collection, then clear the FILE collection, so Universal Email wont be able to use it for the attachment.

the submitted file option will only work if the file is not being saved on the server.

Sign in to reply to this post

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