Server-initiated email causing issues

General Discussion of atomic repo and development projects.

Ask for help here with anything else not covered by other forums.
coolemail
Forum Regular
Forum Regular
Posts: 369
Joined: Tue Dec 16, 2008 8:01 am
Location: United Kingdom

Server-initiated email causing issues

Unread post by coolemail »

Hi Gurus! I hope one of you can help here. I have a customer who has a form on their website where customers can express an interest. It sends them an email in reply which is doing a couple of strange things:

When it arrives in MS Outlook, it generally looks OK, but has

Code: Select all

X-Mailer: PHP/5.2.9
at the very top of the email. Clearly it would be good to get rid of that.

Then I looked at the same email from Horde webmail. It was just showing as html code with nothing in a smart table as it should be.

Then finally, I got one sent to a Hotmail address and that seems to have shown up fine.

The customer says that the copy they get, whilst sent in Ariel font from the domain arrives with them in a different font.

Can someone give me some idea of whether/how I can determine whether this is being caused by the server (and therefore for me to fix) or by their software? And if it is something on the server, can you tell me how I might be able to fix it?

We looked at http://forums.phplist.com/viewtopic.php?f=24&t=28050 but I do not think it is relevant because I don't think I am using that php file:
[root@plesk2 ~]locate phpmailer.php
/opt/plesk-billing/lib-mbapi/include/mail/core/class.phpmailer.php
/usr/local/psa/var/cgitory/CS-Cart-1.3.5-12/htdocs/classes/phpmailer/class.cs_phpmailer.php
/usr/local/psa/var/cgitory/CS-Cart-1.3.5-12/htdocs/classes/phpmailer/class.phpmailer.php
/usr/local/psa/var/cgitory/Help Center Live-2.1.5-2/htdocs/class/phpmailer/class.phpmailer.php
/usr/local/psa/var/cgitory/KnowledgeTreeOSS-3.4.5-8/htdocs/thirdparty/phpmailer/class.phpmailer.php
/usr/local/psa/var/cgitory/Mambo-4.6.2-15/htdocs/includes/phpmailer/class.phpmailer.php
/usr/local/psa/var/cgitory/Owl-0.80-36/htdocs/phpmailer/class.phpmailer.php
/usr/local/psa/var/cgitory/PostNuke-0.761a-56/htdocs/modules/Mailer/pnincludes/class.phpmailer.php
/usr/local/psa/var/cgitory/SugarCRM-5.0.0-12/htdocs/include/phpmailer/class.phpmailer.php
/usr/local/psa/var/cgitory/SugarCRMPro-5.0.0-2/htdocs/include/phpmailer/class.phpmailer.php
/usr/local/psa/var/cgitory/UebiMiau-2.7.8-37/htdocs/inc/class.phpmailer.php
/usr/local/psa/var/cgitory/WebCalendar-1.2.0-4/htdocs/includes/classes/phpmailer/class.phpmailer.php
/usr/local/psa/var/cgitory/WordPress-2.3.3-5/htdocs/wp-includes/class-phpmailer.php
/usr/local/psa/var/cgitory/joomla-1.0.15-7/htdocs/includes/phpmailer/class.phpmailer.php
/usr/local/psa/var/cgitory/joomla-1.5.13-6/htdocs/includes/phpmailer/class.phpmailer.php
/usr/local/psa/var/cgitory/joomla-1.5.13-6/htdocs/libraries/phpmailer/phpmailer.php
/usr/local/psa/var/cgitory/mailer-6.3-4/htdocs/lib/class.phpmailer.php
/usr/local/psa/var/cgitory/mantis-1.1.1-3/htdocs/core/phpmailer/class.phpmailer.php
/usr/local/psa/var/cgitory/moodle-1.8-29/htdocs/lib/phpmailer/class.phpmailer.php
/usr/local/psa/var/cgitory/pLog-1.0-36/htdocs/class/mail/phpmailer/class.phpmailer.php
/usr/local/psa/var/cgitory/phpmyvisites-2.3-28/htdocs/libs/phpmailer/class.phpmailer.php
/usr/local/psa/var/cgitory/xoops-2.2-48/htdocs/class/mail/phpmailer/class.phpmailer.php
/usr/local/psa/var/cgitory/xtcommerce-3.0.4-9/htdocs/includes/classes/class.phpmailer.php
/var/www/vhosts/domain1.com/httpdocs/mambo/includes/phpmailer/class.phpmailer.php
/var/www/vhosts/domain2.com/httpdocs/php/class.phpmailer.php
/var/www/vhosts/domain2.com/subdomains/dev/httpdocs/php/class.phpmailer.php
/var/www/vhosts/domain2.com/subdomains/test/httpdocs/php/class.phpmailer.php
/var/www/vhosts/domain3.eu/httpdocs/mambo/includes/phpmailer/class.phpmailer.php
/var/www/vhosts/domain4.co.uk/httpdocs/joomla/includes/phpmailer/class.phpmailer.php
/var/www/vhosts/domain4.co.uk/httpdocs/joomla2/includes/phpmailer/class.phpmailer.php
/var/www/vhosts/domain4.co.uk/httpdocs/joomla2/libraries/phpmailer/phpmailer.php
/var/www/vhosts/domain5.com/httpdocs/wp/wp-content/plugins/cforms/phpmailer/cforms_phpmailer.php
/var/www/vhosts/domain5.com/httpdocs/wp/wp-content/plugins/cforms/phpmailer/class.phpmailer.php
/var/www/vhosts/domain5.com/httpdocs/wp/wp-includes/class-phpmailer.php
/var/www/vhosts/domain5.com/httpdocs/wp/wp-includes/class-phpmailer.php.bak
/var/www/vhosts/domain6.org/httpdocs/joomla/includes/phpmailer/class.phpmailer.php
/var/www/vhosts/domain6.org/httpdocs/webcalendar/includes/classes/phpmailer/class.phpmailer.php
/var/www/vhosts/domain7.co.ke/httpdocs/blogs/wp-includes/class-phpmailer.php
[root@plesk2 ~]#
I do hope that one of the normal really helpful experts can help, because I'm confused.

Many thanks in advance.
Galactic Zero
Forum Regular
Forum Regular
Posts: 471
Joined: Mon Dec 06, 2004 10:43 pm

Re: Server-initiated email causing issues

Unread post by Galactic Zero »

PHPList is for a mailing list off the server and it has templates that you can customize so that any mass mailing you do from PHPList pre configured.

If the email they are getting is from a web based form created using html, css, etc the submit button will have the name of the program it is calling. I'd look to the configuration of that program as to how it injects the form data into an email.
More specifically I'd look at this program that is calling X-Mailer: PHP/5.2.9.

Here is wha MS says about x-mailer: X-Mailer
http://msdn.microsoft.com/en-us/library/ms819781.aspx

The X-Mailer header identifies the software that created the e-mail message CDOSYS sends. CDOSYS supplies this data in compliance with the nonstandard header definition in RFC 2076: Common Internet Message Headers.
Fields

X-Mailer

Data type: STRING

E-mail client or library in which the message was created, followed by a <CRLF>. This information appears in the message's header section.

Remarks

For more information about nonstandard headers, see RFC 2076: Common Internet Message Headers. For more information about the message body, see RFC 822: Standard for the Format of ARPA Internet Text Messages.

For Microsoft licensing information, see Published Protocols and Royalty-Free License on Microsoft Developer Network (MSDN).
See Also

CDOSYS, Content-Class, X-Newsreader

And again, more information: http://www.example-code.com/vb/X-Mailer.asp
Franklyn Halamka
Still learning my way around Linux Security.
http://www.galacticzero.net
coolemail
Forum Regular
Forum Regular
Posts: 369
Joined: Tue Dec 16, 2008 8:01 am
Location: United Kingdom

Re: Server-initiated email causing issues

Unread post by coolemail »

Thank you for that, Galactic Zero.

So "The X-Mailer header field is used to describe the mail sending software...". Therefore, I guess they are using PHP to send the email. Is there something I can look at to confirm that PHP is doing what it should?

When the customer themselves fill out their form, they even lose the font formatting - it comes out in Times New Roman. Could this be their receiving mail server that is corrupting it?

But when I get the form sent to an Outlook or Outlook Express email address, I do get that "X-Mailer: PHP/5.2.9" bit at the top of the email as I said before. It would be good to get rid of that, and if someone can help me identify what might be causing that to be left within the PHP/5.2.9 or on the outgoing mail server, I'd be really grateful.

Can I expect to find anything in any of the error logs if something is not right, and can you steer me as to which of the many error logs I should look in- I always get confused with that!!

Many thanks, as ever, in advance and in anticipation.
Galactic Zero
Forum Regular
Forum Regular
Posts: 471
Joined: Mon Dec 06, 2004 10:43 pm

Re: Server-initiated email causing issues

Unread post by Galactic Zero »

What it seems to is the program that is sending the form is using PHP. To get to the bottom of this you need to find out what form mailer script they are using to send the completed form with. Examples of form mailer scripts follow:

Formm@iler: http://www.dbmasters.net/node/18
TFMail: http://nms-cgi.sourceforge.net/scripts.shtml

These would be just a couple of the scripts that are out there, both of these are open source, others are commercial. To get to the bottom of this you need to look at what the Submit button on their form is calling. Is it calling a sendmail function within PHP? Is it calling a script... etc.

Once you find this you should be able to check the configuration of it. Also check to see how the text is being encoded. Remember, if the font they are using on the site is not embedded in the email it will show up using the default text of the recipient.
Franklyn Halamka
Still learning my way around Linux Security.
http://www.galacticzero.net
coolemail
Forum Regular
Forum Regular
Posts: 369
Joined: Tue Dec 16, 2008 8:01 am
Location: United Kingdom

Re: Server-initiated email causing issues

Unread post by coolemail »

Thank You again Galactic Zero. I will go back to them and ask them what the Submit is calling up, and if this shows anything useful, I'll post again here. It is strange that an email sent to Hotmail works fine, and when I ask for something to be sent to my own email address, it works fine with just X-Mailer in the top. Yet they have a MS Exchange Server and this appears to lose all the formatting!
Post Reply