[SOLVED] Question regarding NativeMailer (mail() Error)
Moderators: Chris Corbyn, General Moderators
[SOLVED] Question regarding NativeMailer (mail() Error)
Hi!
I tried using the NativeMailer, but it always says my mail() function returned an error. After some tests I found out that its related to the additional parameter given to the mail function (my server doesn't use safe_mode) -> "-oi -f mail@domain.tld", in special the -oi parameter. If the code is modified to not include the "-oi" its working.
I'm not that much into sendmail&co and have no clue whatsoever what exactly this parameter does, so I just wanted to know if its safe to leave it out or if I have to configure something else so the error doesn't happen even with this on...
Thanks in advance for your interest
wurzel
I tried using the NativeMailer, but it always says my mail() function returned an error. After some tests I found out that its related to the additional parameter given to the mail function (my server doesn't use safe_mode) -> "-oi -f mail@domain.tld", in special the -oi parameter. If the code is modified to not include the "-oi" its working.
I'm not that much into sendmail&co and have no clue whatsoever what exactly this parameter does, so I just wanted to know if its safe to leave it out or if I have to configure something else so the error doesn't happen even with this on...
Thanks in advance for your interest
wurzel
- Chris Corbyn
- Breakbeat Nuttzer
- Posts: 13098
- Joined: Wed Mar 24, 2004 7:57 am
- Location: Melbourne, Australia
- Chris Corbyn
- Breakbeat Nuttzer
- Posts: 13098
- Joined: Wed Mar 24, 2004 7:57 am
- Location: Melbourne, Australia
EDIT | I see you're not running safe mode. In that case the issue must lie somewhere with your PHP install. Have you got sendmail installed (is it sendmail or a symlink to something else?). Does anything show in your logs?
It is safe to remove those params, but you might not have much luck gettting your name/address to appear correctly without them.
It is safe to remove those params, but you might not have much luck gettting your name/address to appear correctly without them.
I am using the (latest?) swiftmailer 3.2.4 for php4 hence my post in the swiftmailer forum *giggle*.
I don't think its a bug because my server has safe_mode disabled -> so it (supposedly) correctly passes the $param variable to the function. The question why -oi is troublesome or if it can be safely left out remains
Thanks for the fast replies...
Greetings
wurzel
I don't think its a bug because my server has safe_mode disabled -> so it (supposedly) correctly passes the $param variable to the function. The question why -oi is troublesome or if it can be safely left out remains
Thanks for the fast replies...
Greetings
wurzel
So far I had no problems with the to/replyto Address being in Swift_Address format, all test-emails arrived correctly.
My Server runs on Suse Linux 9.3 and uses qmail.
Could there be problems for other mail-recipients using mail() function in swiftmailer without "-oi" in the ¶m var or do my test-emails prove them to be sent correctly to all recipients?
- Chris Corbyn
- Breakbeat Nuttzer
- Posts: 13098
- Joined: Wed Mar 24, 2004 7:57 am
- Location: Melbourne, Australia
Is it only the -oi, not the -f which is the problem? If the -f is in there then there's a good chance it will just works as it should. Nothing will stop the mail from sending, it would only change what's in the headers of the email.wurzel wrote:Could there be problems for other mail-recipients using mail() function in swiftmailer without "-oi" in the ¶m var or do my test-emails prove them to be sent correctly to all recipients?
Maybe I should make this settable as a sprintf() format string or something?
Code: Select all
$mail_conn->setParams("-oi -f %s");Yes, only the -oi causes problems. Everything else doesn't.
And making this configurable would be nice, this way I wouldn't have to change the code in your script directly which would have to be done (at least for my current server/config) in future updates as well.
Anyways: thanks for this great script
And making this configurable would be nice, this way I wouldn't have to change the code in your script directly which would have to be done (at least for my current server/config) in future updates as well.
Anyways: thanks for this great script
- Chris Corbyn
- Breakbeat Nuttzer
- Posts: 13098
- Joined: Wed Mar 24, 2004 7:57 am
- Location: Melbourne, Australia
No worrieswurzel wrote:Yes, only the -oi causes problems. Everything else doesn't.
And making this configurable would be nice, this way I wouldn't have to change the code in your script directly which would have to be done (at least for my current server/config) in future updates as well.
Anyways: thanks for this great script
- Chris Corbyn
- Breakbeat Nuttzer
- Posts: 13098
- Joined: Wed Mar 24, 2004 7:57 am
- Location: Melbourne, Australia
Got your donation thankswurzel wrote:Nice! I'm happy to hear that. Guess this closes my whole problem
Well, not sure if this is the right place to do so, but I wish you a very nice trip to australia in september. I know its not much, but maybe you can get a nice australian beer or something with the 5 bucks I donated
Cheers bud!
- Chris Corbyn
- Breakbeat Nuttzer
- Posts: 13098
- Joined: Wed Mar 24, 2004 7:57 am
- Location: Melbourne, Australia
mail()'s 5th parameter now settable in v3.2.0:
http://www.swiftmailer.org/wikidocs/v3/ ... nativemail
http://www.swiftmailer.org/wikidocs/v3/ ... nativemail
- Chris Corbyn
- Breakbeat Nuttzer
- Posts: 13098
- Joined: Wed Mar 24, 2004 7:57 am
- Location: Melbourne, Australia