Send Mail error On freebsd,sendmail |
[eluser]whidbey[/eluser]
I have installed sendmail in freebsd system. my CI controler code is: $this->email->from('[email protected]', 'whidbey'); $this->email->to('[email protected]'); $this->email->subject('Email Test'); $this->email->message('Testing the email class.'); $this->email->send(); echo $this->email->print_debugger(); I got the error: Unable to send email using PHP mail(). Your server might not be configured to send mail using this method. From: "whidbey" Return-Path: what can I do ?thank you
[eluser]coolfactor[/eluser]
Based on that error message, you're not using sendmail, but rather PHP's built-in mail() function, which is the default for the Email class. You need the set the "protocol" property of your Email class to "sendmail". Code: $config['protocol'] = 'sendmail';
[eluser]whidbey[/eluser]
Oh yeah,thx,It pass the message: Your message has been successfully sent using the following protocol: sendmail User-Agent: CodeIgniter Date: Mon, 6 Aug 2007 09:59:46 +0800 From: "whidbey" But I go to my mail box.I have't received it yet.. Is It really success??
[eluser]coolfactor[/eluser]
When using the sendmail protocol, it's not always clear if it works properly. Make sure all parameters are set correctly (To, From, Subject, etc). You may also want to check your spam filter.
[eluser]whidbey[/eluser]
how to clear it?thx.. I am not sure how to check the spam yet...
[eluser]coolfactor[/eluser]
[quote author="whidbey" date="1186385111"]how to clear it?thx.. I am not sure how to check the spam yet...[/quote] It might help to mention your native language, and someone that speaks it will be able to help you more easily. If you're not receiving your email when using "sendmail", then you might try using "smtp" and filling in the following config parameters: - smtp_host - smtp_user - smtp_pass I've had good success using smtp to send email.
[eluser]whidbey[/eluser]
I use my local freebsd server,dont have smtp user. so I not fill smtp_user ,smtp_pass field. I check my stmp server,it runs on 25 port ok,and when I telnet localhost 25, I can get the reply: 250-ENHANCEDSTATUSCODES 250-PIPELINING 250-EXPN 250-VERB 250-8BITMIME 250-SIZE 250-DSN 250-ETRN 250-AUTH LOGIN PLAIN 250-DELIVERBY 250 HELP so smtp server is running ok. and my /etc/mail/access accept local access already.. so I dont know how next.. by the way,I use default charset utf-8 to send mail. thx
[eluser]whidbey[/eluser]
ok,it can send now. but why gmail receive it as spam mail. 126.com receive it as normal mail? thx
[eluser]coolfactor[/eluser]
[quote author="whidbey" date="1186395205"]ok,it can send now. but why gmail receive it as spam mail. 126.com receive it as normal mail? thx[/quote] You'll have to contact Gmail about that.
[eluser]whidbey[/eluser]
thx, but suppose any other mail like yahoo,sina,hotmail still accept it as spam mail... need I tell them one by one? as our users may use any kind of mailbox.. thx |
Welcome Guest, Not a member yet? Register Sign In |