The following warnings occurred: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Warning [2] Undefined array key "avatartype" - Line: 783 - File: global.php PHP 8.1.31 (Linux)
|
Email Submission Issues - Printable Version +- Form Tools (https://forums.formtools.org) +-- Forum: Form Tools (https://forums.formtools.org/forumdisplay.php?fid=1) +--- Forum: General Discussion (https://forums.formtools.org/forumdisplay.php?fid=5) +--- Thread: Email Submission Issues (/showthread.php?tid=1336) |
Email Submission Issues - MattsM3 - May 31st, 2011 First and foremost, I would like to thank everyone who take their time to develop such a simple awesome tool. I have installed Form Tools several times and this is the first issue I have run into... The database is capturing all the field information on submittable of a form, but I cannot seem to get an email to send. I am using the plain templates provided (All Fields: To admin/client) and i'm submitting to my normal email, from my normal email... When I noticed the emails were not coming through I went to text the email and when I choose the email format "HTML & Text" I recieve an error message "Your test email could not be sent." yet when I submit the emails individually as HTML or text, i receive "Your email has been successfully sent." and the email looks good when received... Any suggestions would be greatly appreciated... This form is at http://www.germanautoservice.com if you were wondering. RE: Email Submission Issues - Ben - May 31st, 2011 Hi Matts, Thanks for the post! Yeah, unfortunately this is a relatively common problem. PHP comes with a built-in mail() function which takes a few parameters, one of which is to specify the email headers. Headers are just "meta data" about the emails, including the recipient list, bccs, ccs etc. Emails that are sent as both HTML and text are known as "multipart" emails; the email client of the person who gets the email decides which one to view (html or text). The thing is, with PHP, to send multipart emails, the entire email content gets submitted in one long string through the headers and not the body of the script. It's just the way it works: very old school, very unintuitive - and can cause problems on some servers. What happens is that a number of servers simply prevent you getting that much control over your email content, because if you can change and set the header content, it can open up the server to be being used as spam or sending fraudulent emails. So anyway, long answer! The point is that a lot of servers prevent you from sending HTML+text emails, which is why it's throwing an error on your system. To get around this, I bundle Form Tools with a Swift Mailer module that lets you configure it with an SMTP server to send emails. That's a far more reliable, consistent way to send emails. I'd suggest either looking into that, or limiting your email templates to only send in either text or HTML format. http://modules.formtools.org/swift_mailer/ Hope the info helps, and good luck! - Ben |