Post subject: how do i attach an email to a php form
i have this script
Code:
mail($to, $subject, $msg, $additional_headers);
culminating into this:
Code:
mail('support@building-doctors.com','Contact Us Form','Hello Alex, you need to check your records as '.$_POST['name'].' whose email address is '.$_POST['email'].' has filled out the form. ', "From: webmaster@buildingdoctors.co.uk");
how do i now attach a file to i as an attachment
Thu Sep 23, 04 2:28 am
quantum Site Admin
Joined: 07 Mar 2004 Posts: 1048
Location: Dhaka, Bangladesh
Post subject: Email script with attachment feature
Buzzby, you need to post the entire script. We cannot solve it from two lines.
Another solution is you can install a new webmail in your site.
Openwebmail is an open source web mail written in php script. It has all the features of a standard email program, including the attachment feature. Take a look into it.
[http://www.openwebmail.org/]
If you want to fix the exisiting script, post the entire script. Or you downloaded it from somewhere give us the URL.
the name is BUZZBY not buzzboy.......makes me sound like a bee or wasp or something. no offense. cheers
Thu Sep 23, 04 2:50 am
quantum Site Admin
Joined: 07 Mar 2004 Posts: 1048
Location: Dhaka, Bangladesh
Post subject:
Oh gee...I am sorry man. I did not mean to offense you. I was not thinking in that direction. But now that you mentioned it, I am laughing so hard....I will definitely remember to call you B U Z Z B Y. _________________
Dust fills my eyes / Clouds roll by / and I roll with them / Centuries cry / Orders fly / and I fall again
Afford best design, implement best solution. Outsource your web design.
mail('support@building-doctors.com','Contact Us Form','Hello Alex, you need to check your records as '.$_POST['name'].' whose email address is '.$_POST['email'].' has filled out the form. ', "From: webmaster@buildingdoctors.co.uk");
mail($_POST['email'],'Building Doctors','Hello '.$_POST['name'].', thank you for your enquiry on '.$_POST['my_date'].'. We will be following up your request shortly. You have said that: Your preferred Design Style is '.$_POST['designstyle'].'. Your approximate Construction Budget is £'.$_POST['budgetcost'].'. Please review the useful links about Professional and our Duty of care policy located at the bottom right of the site. In the meantime wait for our call. Regards, Building Doctor', "From: support@building-doctors.co.uk");
//mail('dmc@dcobbinah.co.uk','Filed in Form','Hello Chris, you need to check your records as '.$_POST['name'].' has filled out the form and has included credit card details. ', "From: sales@victoriafinejewellery.com");
//this mail proves that multiple mail settings can be made to send differing emails to different addresses while still including attributes from the submitted form
echo "<table border=1 cellpadding=2 cellspacing=2 class=biggertext><tr><td>";
echo "</tr></td><tr><td><img src=images/cr_header.gif></tr></td><tr><td>";
echo 'Hello '.$_POST['name'].', thank you for your enquiry on '.$_POST['my_date'].'.<br>We will be following up your request shortly. <br><br>You have said that: <br>Your preferred Design Style is '.$_POST['designstyle'].'. <br>Your approximate Construction Budget is £'.$_POST['budgetcost'].'.<br><br>Please review the useful links about Professional and our Duty of care policy located at the bottom right of the site. <p>In the meantime wait for our call. <p><p>Regards, <br>Building Doctor';
echo "</tr></td></table>";
echo "<body onLoad=redirect() text=#000000 link=#00FFFF vlink=#C0C0C0>";
this starts the table. the actual table can be seen here:
[http://www.buildingdoctors.co.uk] (click to enter the site) click SIGN UP the DETAILED FORM and you will see the form. this is the whole php script above. how do i put a 'attach file to email' script?
Thu Sep 23, 04 3:16 am
quantum Site Admin
Joined: 07 Mar 2004 Posts: 1048
Location: Dhaka, Bangladesh
Post subject:
Okay, thanks for posting the script. This will take some time to go through. But I think, I can fix that. No worries. _________________
Dust fills my eyes / Clouds roll by / and I roll with them / Centuries cry / Orders fly / and I fall again
Afford best design, implement best solution. Outsource your web design.
i left out an important piece of info. the attachemtn is to be sent out to people as an attachment to the confirmation mail they recieve. they are not attaching a file. its me that will be sending them a file with the confirmation
Thu Sep 23, 04 6:05 am
quantum Site Admin
Joined: 07 Mar 2004 Posts: 1048
Location: Dhaka, Bangladesh
Post subject:
Buzzby, it seems like I am too swamped with things to get around to your scripts. You can wait a few more days for me to get around to this script or you can just install a new email script. _________________
Dust fills my eyes / Clouds roll by / and I roll with them / Centuries cry / Orders fly / and I fall again
Afford best design, implement best solution. Outsource your web design.
make sure your attatchment file much reside on your server. not from your machine. If you want to add from your machine then you need to upload it first. IF you need upload script just let me know. _________________ Sarder Hasnut
MCSD, CIW A
Need Low Cost Prefessional Hosting Contact me
now i can get your mean tthat you want your custormer to see your brochure when they get an auto-response email, right?
Well, i just want to talk beside technical thing. That you should have your brochure well-designed on the page, then let your customer re-direct to that page after they submit the form.
The reason for this is quite easy, that your custormer can have a chance to see and print your brochure if needed right away. and you can have a response or thank them here for convenient.
Otherwise, your custormer will have to check mail and download that attached email later and they might skip looking at the attachment, i mean the chances to see your brochure will be shortened.
Wed Oct 20, 04 10:09 pm
hasnatme Moderator
Joined: 22 Aug 2004 Posts: 283
Location: Dhaka,Bangladesh
Post subject:
nmtee wrote:
Hi Buzzby,
now i can get your mean tthat you want your custormer to see your brochure when they get an auto-response email, right?
Well, i just want to talk beside technical thing. That you should have your brochure well-designed on the page, then let your customer re-direct to that page after they submit the form.
The reason for this is quite easy, that your custormer can have a chance to see and print your brochure if needed right away. and you can have a response or thank them here for convenient.
Otherwise, your custormer will have to check mail and download that attached email later and they might skip looking at the attachment, i mean the chances to see your brochure will be shortened.
I must agree with this comment and you can make both redirection and e-maill too. _________________ Just Fly With Your Dreams!!!
Digital Vision