close ad
WARNING: Do Not Install the DREAMWEAVER CC 2017 Update »
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Attachment will not send with form

Thread began 6/01/2010 3:27 pm by koerbcm | Last modified 6/16/2010 5:18 pm by chacon407735 | 1381 views | 10 replies |

koerbcm

Attachment will not send with form

When using UE4 i can not get my form to send a attachment with the email nor can i get it to upload it to the server to store it which i hear it must do to work. I have tried everything i can think of and nothing seems to work.

<?php?>
<?php require_once("webassist/email/mail_php.php"); ?>
<?php require_once("webassist/email/mailformatting_php.php"); ?>
<?php
if (!isset($_SESSION))session_start();
if (($_SERVER["REQUEST_METHOD"] == "POST")) {
//WA Universal Email object="mail"
set_time_limit(0);
$EmailRef = "WAUE_contact_1";
$BurstSize = 200;
$BurstTime = 1;
$WaitTime = 1;
$GoToPage = "contact_submitted.php";
$RecipArray = array();
$StartBurst = time();
$LoopCount = 0;
$TotalEmails = 0;
$RecipIndex = 0;
// build up recipients array
$CurIndex = sizeof($RecipArray);
$RecipArray[$CurIndex] = array();
$RecipArray[$CurIndex ][] = "";
$TotalEmails += sizeof($RecipArray[$CurIndex]);
$RealWait = ($WaitTime<0.25)?0.25:($WaitTime+0.1);
$TimeTracker = Array();
$TotalBursts = floor($TotalEmails/$BurstSize);
$AfterBursts = $TotalEmails % $BurstSize;
$TimeRemaining = ($TotalBursts * $BurstTime) + ($AfterBursts*$RealWait);
if ($TimeRemaining < ($TotalEmails*$RealWait) ) {
$TimeRemaining = $TotalEmails*$RealWait;
}
$_SESSION[$EmailRef."_Total"] = $TotalEmails;
$_SESSION[$EmailRef."_Index"] = 0;
$_SESSION[$EmailRef."_Remaining"] = $TimeRemaining;
while ($RecipIndex < sizeof($RecipArray)) {
$EnteredValue = is_string($RecipArray[$RecipIndex][0]);
$CurIndex = 0;
while (($EnteredValue && $CurIndex < sizeof($RecipArray[$RecipIndex])) || (!$EnteredValue && $RecipArray[$RecipIndex][0])) {
$starttime = microtime_float();
if ($EnteredValue) {
$RecipientEmail = $RecipArray[$RecipIndex][$CurIndex];
} else {
$RecipientEmail = $RecipArray[$RecipIndex][0][$RecipArray[$RecipIndex][2]];
}
$EmailsRemaining = ($TotalEmails- $LoopCount);
$BurstsRemaining = ceil(($EmailsRemaining-$AfterBursts)/$BurstSize);
$IntoBurst = ($EmailsRemaining-$AfterBursts) % $BurstSize;
if ($AfterBursts<$EmailsRemaining) $IntoBurst = 0;
$TimeRemaining = ($BurstsRemaining * $BurstTime * 60) + ((($AfterBursts<$EmailsRemaining)?$AfterBursts:$EmailsRemaining)*$RealWait) - (($AfterBursts>$EmailsRemaining)?0:($IntoBurst*$RealWait));
if ($TimeRemaining < ($EmailsRemaining*$RealWait) ) {
$TimeRemaining = $EmailsRemaining*$RealWait;
}
$CurIndex ++;
$LoopCount ++;
session_commit();
session_start();
$_SESSION[$EmailRef."_Index"] = $LoopCount;
$_SESSION[$EmailRef."_Remaining"] = round($TimeRemaining);
session_commit();
wa_sleep($WaitTime);
include("WA_Universal_Email/WAUE_contact_1.php");
$endtime = microtime_float();
$TimeTracker[] =$endtime - $starttime;
$RealWait = array_sum($TimeTracker)/sizeof($TimeTracker);
if ($LoopCount % $BurstSize == 0) {
$TimePassed = (time() - $StartBurst);
if ($TimePassed < ($BurstTime*60)) {
$WaitBurst = ($BurstTime*60) -$TimePassed;
wa_sleep($WaitBurst);
}
else {
$TimeRemaining = ($TotalEmails- $LoopCount)*$RealWait;
}
$StartBurst = time();
}
if (!$EnteredValue) {
$RecipArray[$RecipIndex][0] = mysql_fetch_assoc($RecipArray[$RecipIndex][1]);
}
}
$RecipIndex ++;
}
$_SESSION[$EmailRef."_Total"] = 0;
$_SESSION[$EmailRef."_Index"] = 0;
$_SESSION[$EmailRef."_Remaining"] = 0;
session_commit();
session_start();
if ($GoToPage!="") {
header("Location: ".$GoToPage);
}
}
?>


<form action="contact_submit_resume.php" method="post" enctype="multipart/form-data" name="form1" id="form1">
<table width="730" border="0" cellpadding="4" cellspacing="0" style="font-size:13px"><div style="text-align:left">
<tr>
<td width="204" align="left" valign="middle" class="td_leftalign">
<label><span class="text_contentBOLD">First Name:</span></label>
</span></td>
<td width="477" align="left" valign="middle" class="td_leftalign"><span id="Fname">
<input name="fname" type="text" id="fname" size="32" />
<span class="textfieldRequiredMsg">Your first name is required.</span></span></td>
</tr>
<tr>
<td class="td_leftalign">
<label><span class="text_contentBOLD">Last Name:</span></label>
</span></td>
<td align="left" valign="middle" class="td_leftalign"><span id="Lname">
<input name="lname" type="text" id="lname" size="32" />
<span class="textfieldRequiredMsg">Your last name is required.</span></span></td>
</tr>
<tr>
<td class="td_leftalign">
<label><span class="text_contentBOLD">Primary Email Address:</span></label>
</span></td>
<td class="td_leftalign"><span id="sprytextfield3">
<input name="email" type="text" id="email" size="32" />
<span class="textfieldRequiredMsg">An email address is required.</span><span class="textfieldInvalidFormatMsg">Invalid email format.</span></span></td>
</tr>
<tr>
<td class="td_leftalign">
<label><span class="text_contentBOLD">Secondary Email Address:</span></label>
</span></td>
<td class="td_leftalign"><span id="sprytextfield4">
<input name="email2" type="text" id="email2" size="32" />
<span class="textfieldInvalidFormatMsg">Invalid email format.</span></span></td>
</tr>
<tr>
<td class="td_leftalign"><span class="text_contentBOLD">Primary Phone #:</span></td>
<td class="td_leftalign"><span id="sprytextfield5">
<input type="text" name="phone1" id="phone1" />
<span class="textfieldRequiredMsg">A phone number is required.</span></span></td>
</tr>
<tr>
<td class="td_leftalign">
<label><span class="text_contentBOLD">Secondary Phone #:</span></label>
</span></td>
<td class="td_leftalign"><input type="text" name="phone2" id="phone2" /></td>
</tr>
<tr>
<td colspan="2" class="td_leftalign">
<label><span class="text_contentBOLD">Comments:</span><br />
<textarea name="comments" id="comments" cols="85" rows="10"></textarea>
</label>
</span></td>
</tr>
<tr>
<td class="td_leftalign"><span class="text_contentBOLD">Resume (Upload file):</span></td>
<td class="td_leftalign"><input name="resume" type="file" id="upload" size="32" /></td>
</tr>
<tr>
<td class="td_leftalign"><input type="submit" name="submit" id="submit" value="Submit" />
<input type="reset" name="Reset" id="button" value="Reset" /></td>
<td class="td_leftalign">&nbsp;</td>
</tr>
</table></form>
<script type="text/javascript">
<!--
var sprytextfield1 = new Spry.Widget.ValidationTextField("Fname", "none", {validateOn:["change"]});
var sprytextfield2 = new Spry.Widget.ValidationTextField("Lname", "none", {validateOn:["change"]});
var sprytextfield3 = new Spry.Widget.ValidationTextField("sprytextfield3", "email", {validateOn:["change"]});
var sprytextfield4 = new Spry.Widget.ValidationTextField("sprytextfield4", "email", {isRequired:false, validateOn:["change"]});
var sprytextfield5 = new Spry.Widget.ValidationTextField("sprytextfield5", "none", {validateOn:["change"]});
//-->
</script>

Sign in to reply to this post

Jason ByrnesWebAssist

Please a copy of your php page and the webassist directory to a zip file and attach it to your reply so I can examine the code.

Sign in to reply to this post

koerbcm

fixed

I guess i was using UE3 and Digital File Pro, so when i upgraded to UE4 and redid all the code it now works correctly. Thank you for your quick response.

Sign in to reply to this post

Jason ByrnesWebAssist

Ok, glad to hear it is working.

Sign in to reply to this post

chacon407735

Form will not send attachement

I've created a simple form with a file upload field, but when i send it everything comes through except for the attachment. I've been wrestling with this for hours and nothing seems to work. Please, any help would be greatly appreciated.

Attached Files
beheard.php.zip
Sign in to reply to this post

Jason ByrnesWebAssist

send a copy of the webassist/email/waue_contact_8.php file so i can see how attachments have been configured.

Sign in to reply to this post

chacon407735

file

Here's the file you requested.

Attached Files
waue_contact_8.php.zip
Sign in to reply to this post

Jason ByrnesWebAssist

from the file you have sent, attachments have not been configured at all in Universal Email.

On the main page, double click the Universal Email server behavior to edit it.

In the Universal Email wizard, click the paper clip icon top configure attachments.

click the Plus button, then select Submitted File and select the File field from the dropdown list.

Sign in to reply to this post

chacon407735

Sorry, by main page do you mean the page that has the form on it, or the index page of the site? I want to be sure to edit the right thing.

Sign in to reply to this post

Jason ByrnesWebAssist

the page that universal email was applied to. the contact page.

Sign in to reply to this post
loading

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