Error message when using mail() |
[eluser]Robb__[/eluser]
I got a strange message after moving my site to a different server, it sounds bad. Did I choose the wrong host? Quote:A PHP Error was encountered
[eluser]nirbhab[/eluser]
if you are working on localhost than you would have to configure your smtp in php.ini file and restart the server. if you are working on domain provided by other servers, case is different, in both the cases the mail script you are using must have the mail address same for senders mail address. eg. var $useragent = "CodeIgniter"; var $mailpath = "/usr/sbin/sendmail"; // Sendmail path var $protocol = "mail"; // mail/sendmail/smtp var $smtp_host = "mail.server.in"; // SMTP Server. Example: mail.earthlink.net var $smtp_user = ""; // SMTP Username var $smtp_pass = ""; // SMTP Password is the Email.php file, you need to configure it to send mail, i suppose. i think this might help you out.
[eluser]Robb__[/eluser]
[quote author="nirbhab" date="1192715279"]if you are working on localhost than you would have to configure your smtp in php.ini file and restart the server. if you are working on domain provided by other servers, case is different, in both the cases the mail script you are using must have the mail address same for senders mail address. eg. var $useragent = "CodeIgniter"; var $mailpath = "/usr/sbin/sendmail"; // Sendmail path var $protocol = "mail"; // mail/sendmail/smtp var $smtp_host = "mail.server.in"; // SMTP Server. Example: mail.earthlink.net var $smtp_user = ""; // SMTP Username var $smtp_pass = ""; // SMTP Password is the Email.php file, you need to configure it to send mail, i suppose. i think this might help you out.[/quote] This info is correct according to my server-provider Quote:var $useragent = "Code Igniter"; This I'm not sure about: Quote:var $mailpath = "/usr/sbin/sendmail"; // Sendmail path How do I check this?
[eluser]Robb__[/eluser]
This is my new (big) error message after configuring the email.php file what could be wrong? Quote:A PHP Error was encountered
[eluser]developer_rtpl[/eluser]
I got strange message when i am sending mail through CI Quote:A PHP Error was encountered Below this i am getting my email template. in plain/text and plain/html format I am loading my email library using this code Quote: $config['protocol'] = 'mail';
[eluser]MCrittenden[/eluser]
Any updates here? I'm getting the same errors as #3.
[eluser]smilie[/eluser]
@MCrittenden: If you receive same message as #3, then this is the clue: Message: fsockopen() [function.fsockopen]: unable to connect to http://mail7.space2u.com/:25 (Unable to find the socket transport “http” - did you forget to enable it when you configured PHP?) If you are trying this on your webhost server, there is a good chance that they have secured fsockopen function within PHP and do not allow it to connect remotely. Which would explain the problem :-) Regards, Smilie
[eluser]MCrittenden[/eluser]
@smilie: Thanks! Figured it out, I was telling CI to use the wrong port. Changed smtp_port to 25 and all works as expected. |
Welcome Guest, Not a member yet? Register Sign In |