I posted this a few mins ago, but it appears I posted it in the wrong section...
I have been using Swift Mailer on my web server for about 2 months now with out any problems. Then about a week ago the hosting company upgraded something and my mailer scripts stopped working. In my php code I changed the following line
Line number On/Off | Expand/Contract
$swift =& new Swift(new Swift_Connection_Sendmail("/usr/sbin/sendmail -bs"));
to
Line number On/Off | Expand/Contract
$swift =& new Swift(new Swift_Connection_Sendmail("/usr/sbin/sendmail -t"));
and it kind of works again except the messages that I get now have no body attached to them. Basically I get an email addressed to the correct person with no Subject and no Body.
Does anyone have any ideas of what I could try to get the message bodies back in the emails?
Thanks,
whit3fir3
Problem with SwiftMailer...
Moderators: Chris Corbyn, General Moderators
- Chris Corbyn
- Breakbeat Nuttzer
- Posts: 13098
- Joined: Wed Mar 24, 2004 7:57 am
- Location: Melbourne, Australia
Re: Problem with SwiftMailer...
Don't use -t. It states in the documentation that you shouldn't use it. You need -bs. -t and -bs make sendmail behave extremely differently.
In version 3 I was experimenting with -t support but never fully implemented it so it worked on some servers but not on others. Version 4 has complete -t support when it comes out however... I changed the whole transport subsystem in v4 which made supporting it much easier.
In version 3 I was experimenting with -t support but never fully implemented it so it worked on some servers but not on others. Version 4 has complete -t support when it comes out however... I changed the whole transport subsystem in v4 which made supporting it much easier.
Re: Problem with SwiftMailer...
Chris,
Thanks for your reply. The reason I started using -t is because when I use -bs now the script just fails. The error logs that are produced are not much help either. I started playing around with it and I found that when calling sendmail with the -t I atleast am getting the emails, I am just not getting any body with the emails. For the time being I have the issue resolved using the native PHP mail() function. I just thought I would post this and see if any one had any ideas. If not I'll wait for version before I start using -t again.
Thanks,
whit3fir3
Thanks for your reply. The reason I started using -t is because when I use -bs now the script just fails. The error logs that are produced are not much help either. I started playing around with it and I found that when calling sendmail with the -t I atleast am getting the emails, I am just not getting any body with the emails. For the time being I have the issue resolved using the native PHP mail() function. I just thought I would post this and see if any one had any ideas. If not I'll wait for version before I start using -t again.
Thanks,
whit3fir3
- John Cartwright
- Site Admin
- Posts: 11470
- Joined: Tue Dec 23, 2003 2:10 am
- Location: Toronto
- Contact:
Re: Problem with SwiftMailer...
What are the error messages when using -bs?
- Chris Corbyn
- Breakbeat Nuttzer
- Posts: 13098
- Joined: Wed Mar 24, 2004 7:57 am
- Location: Melbourne, Australia
Re: Problem with SwiftMailer...
Use the NativeMail connection since it just wraps mail() which does do "sendmail -t". I had valid reasons for not supporting -t in version 3 and didn't really go out of my way much to support it in version 4, it's just that supporting it in version 4 was effectively a few lines of extra codewhit3fir3 wrote:Chris,
Thanks for your reply. The reason I started using -t is because when I use -bs now the script just fails. The error logs that are produced are not much help either. I started playing around with it and I found that when calling sendmail with the -t I atleast am getting the emails, I am just not getting any body with the emails. For the time being I have the issue resolved using the native PHP mail() function. I just thought I would post this and see if any one had any ideas. If not I'll wait for version before I start using -t again.
Thanks,
whit3fir3
-t mode as a general concept is not great IMO... you never find out your message failed to send until you get a bounce back in your inbox.