Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

We've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

General Questions /

General questions about getting started with SilverStripe that don't fit in any of the categories above.

Moderators: martimiz, Sean, Ed, biapar, Willr, Ingo, swaiba

Problems with sending mail ,possible bug ?


Go to End


6 Posts   1837 Views

Avatar
Fuzz10

Community Member, 791 Posts

2 May 2009 at 2:01am

Hi,

We are having huge problems with one of your sites running on Silverstripe.

It seems SS intermittently screws up outgoing mail-headers.

I can't discover any regularity in the problem , but if I try to send out a mail from the website, +/- 3 out of 10 times it will mangle the mailheaders by replacing the mail-subject , to , cc and bcc values with the value I set for the "from" address.

This happens both in our site as well as in the newsletter module. Sending a newsletter to 1000 people , will result in around 200 to 300 people not receiving it.

Trying to find the problem :
- We checked our mail-logs, but the correct "TO" address never reached our mailserver. So it is not a delivery problem.
- We cannot find any logic behind SS's behaviour. It mangles different addresses on every run (tested that in our mailing-list).
- The intervals are completely random...

Here is a part of the list of outgoing mails that the newsletter produced. Wherever you see "news@ourdomain.com" , the mail never got send to the actual recipient and the subject,to and cc field were replaced by "news@ourdomain.com".

The body of the (personalized) mail was correct and had the correct values (recipients name , email-address etc. etc.).

To: news@ourdomain.com
To: news@ourdomain.com
To: news@ourdomain.com
To: xxx@gmail.com
To: xxxx@hotmail.com
To: xxx@live.nl
To: xxxx@hotmail.com
To: xxxx@g-vang.dk
To: xxxx@gmail.com
To: xxxx@hotmail.com
To: xxxx@hotmail.com
To: news@ourdomain.com
To: news@ourdomain.com
To: @hotmail.com
To: xxxx@hotmail.com

Can anyone confirm this odd behaviour ?

Avatar
Fuzz10

Community Member, 791 Posts

2 May 2009 at 8:22pm

FYI : Got a bit further with this.

Yesterday, after posting to the forum , we transferred the site to a different server and the problems seem to have vanished.

There are 2 differences in the configuration :

1> X-Cache is disabled
2> PHP Version is 5.2.x instead of 5.1.6

I suspect PHP v5.1.6. was acting up (again). Next week , we'll try enabling x-Cache again to see what happens.

Isn't it a good idea to change the PHP 5.2.X recommendation into a requirement ? This is not the first time 5.1.6 has been giving me a hard time.

Avatar
Fuzz10

Community Member, 791 Posts

15 May 2009 at 11:35pm

We have isolated the problem !

xCache seems to be the culprit. Switching it on generates very odd problems with silverstripe's mailing-system.

Avatar
Willr

Forum Moderator, 5523 Posts

16 May 2009 at 11:08am

Hmm good to know. If you could research what the cache has to do with the email / why the bug occurs then you might like to make a ticket for this on open.silverstripe.com

Avatar
Fuzz10

Community Member, 791 Posts

19 May 2009 at 12:55am

Willr,

Well, it is very hard to pinpoint the origin of the bug.

For us , the easiest way to reproduce the problem with xCache is sending a newsletter with a couple of hundred recipients. We noticed that 2 to 3 out of 10 mails gets screwed up (mangles to / bcc / cc / subject fields). Switching off xCache and running the same job does not produce any problems.

Avatar
dalesaurus

Community Member, 283 Posts

15 January 2010 at 5:39am

Edited: 15/01/2010 5:40am

Chiming it that this was 100% affecting me also, and disabling xCache fixed the issue.

When sending 2 separate emails in the same execution, the second would have corrupted headers sending To, Cc, and From as the same email address. Oddly the first would go through correctly.

Configuration:
CentOS 5.1
php 5.2.11
apache 2.2.14
xcache 1.2.2

At first I thought it was whatever sendmail program I was using, so I tried 4 different ones all with the same result as well as many variations on the configs, -t, no -t, etc.

I wonder if this would be because the mail generating functions in Mailer are global and not wrapped in a class? Would this cause xcache to compile/store them some silly way that would cause corrupt header generation?

Also I opened a ticket: http://open.silverstripe.org/ticket/4920