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

Special character in subject line - email not send

Thread began 6/04/2013 9:34 am by Jediha | Last modified 12/19/2013 5:08 pm by Jason Byrnes | 778 views | 9 replies |

Jediha

Special character in subject line - email not send

On a page with universal email server beh. applied, the subject is taken from a database row.:
<?php
$MailAttachments = "";
$MailBCC = "";
$MailCC = "";
$MailTo = "";
$MailBodyFormat = "";
$MailBody = "";
$MailImportance = "";
$MailFrom = "info@xxxxxx.nl";
$MailSubject = "".$row_rsgetmail['mail_xxxxx'] ."";
$_SERVER["QUERY_STRING"] = "";

//Global Variables
$WA_MailObject = WAUE_Definition("localhost","25","","","","UTF-8");


But whenever the subject contains a special character like ë, é it seems like the email is sending, no errors, but the mail is never delivered.

As soon as I replace ë for e, the email is sending ok.
The Mailobject has UTF-8, so are the database fields.
Any suggestions are welcome!

Sign in to reply to this post

Jason ByrnesWebAssist

Use Dynamic Connections to create the database connection for your pages, in Dynamic Connections, set the connection character set to UTF-8.

If the connection character set is not UTF-8, foreign characters wont be returned correctly.

Sign in to reply to this post

Jediha

Thank you. I did that, opened and saved the mail message again, and noticed in the database that the characters showed right.

But still when I tried to sent the mail, the script is working, but no mail is received (also not in my spam folder). When I remove the special character from the subject field, I receive the mail.

Sign in to reply to this post

Jason ByrnesWebAssist

I'll need to troubleshoot directly, see the private message section.

Sign in to reply to this post

marcel303333

Hi Jason,

how did you solve the problem?

I have the same problem with my subjects in german e-mails. Universal Email it set to UTF-8. Special characters in the body works but not in the subject.

Sign in to reply to this post

Jason ByrnesWebAssist

by adding url encoding:

$MailSubject = "".urlencode($row_rsgetmail['mail_xxxxx']) ."";

Sign in to reply to this post

marcel303333

Thank you for your help!

Sign in to reply to this post

Jason ByrnesWebAssist

you're welcome.

Sign in to reply to this post

marcel303333

How would I have to change the following code?

$MailSubject = "".((isset($_POST["Betreff"]))?$_POST["Betreff"]:"") ."";

Sign in to reply to this post

Jason ByrnesWebAssist

$MailSubject = "".((isset($_POST["Betreff"]))?urlencode($_POST["Betreff"]):"") ."";

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