How can i send email ? where is the wrong? |
[eluser]Unknown[/eluser]
This is my code Code: <?php A PHP Error was encountered Severity: Warning Message: fsockopen() [function.fsockopen]: unable to connect to ssl://smtp.googlemail.com:456 (Unable to find the socket transport "ssl" - did you forget to enable it when you configured PHP?) Filename: libraries/Email.php Line Number: 1689 A PHP Error was encountered Severity: Warning Message: fwrite(): supplied argument is not a valid stream resource Filename: libraries/Email.php Line Number: 1846 A PHP Error was encountered Severity: Warning Message: fgets(): supplied argument is not a valid stream resource Filename: libraries/Email.php Line Number: 1869 A PHP Error was encountered Severity: Warning Message: fwrite(): supplied argument is not a valid stream resource Filename: libraries/Email.php Line Number: 1846 A PHP Error was encountered Severity: Warning Message: fgets(): supplied argument is not a valid stream resource Filename: libraries/Email.php Line Number: 1869 A PHP Error was encountered Severity: Warning Message: fwrite(): supplied argument is not a valid stream resource Filename: libraries/Email.php Line Number: 1846 A PHP Error was encountered Severity: Warning Message: fgets(): supplied argument is not a valid stream resource Filename: libraries/Email.php Line Number: 1869 A PHP Error was encountered Severity: Warning Message: fwrite(): supplied argument is not a valid stream resource Filename: libraries/Email.php Line Number: 1846 A PHP Error was encountered Severity: Warning Message: fgets(): supplied argument is not a valid stream resource Filename: libraries/Email.php Line Number: 1869 A PHP Error was encountered Severity: Warning Message: fwrite(): supplied argument is not a valid stream resource Filename: libraries/Email.php Line Number: 1846 A PHP Error was encountered Severity: Warning Message: fwrite(): supplied argument is not a valid stream resource Filename: libraries/Email.php Line Number: 1846 A PHP Error was encountered Severity: Warning Message: fgets(): supplied argument is not a valid stream resource Filename: libraries/Email.php Line Number: 1869 A PHP Error was encountered Severity: Warning Message: Cannot modify header information - headers already sent by (output started at C:\wamp\www\ci\application\controllers\email1.php:59) Filename: core/Common.php Line Number: 442 An Error Was Encountered The following SMTP error was encountered: 0 Unable to find the socket transport "ssl" - did you forget to enable it when you configured PHP? Unable to send data: AUTH LOGIN Failed to send AUTH LOGIN command. Error: Unable to send data: MAIL FROM: from: The following SMTP error was encountered: Unable to send data: RCPT TO: to: The following SMTP error was encountered: Unable to send data: DATA data: The following SMTP error was encountered: Unable to send data: User-Agent: CodeIgniter Date: Sun, 6 May 2012 08:22:08 +0000 From: "alamin" Return-Path: To: [email protected] Subject: =?utf-8?Q?This_is_an_email_test?= Reply-To: "[email protected]" X-Sender: [email protected] X-Mailer: CodeIgniter X-Priority: 3 (Normal) Message-ID: <[email protected]> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit It is working. Great! Unable to send data: . The following SMTP error was encountered: Unable to send email using PHP SMTP. Your server might not be configured to send mail using this method. User-Agent: CodeIgniter Date: Sun, 6 May 2012 08:22:08 +0000 From: "alamin" Return-Path: To: [email protected] Subject: =?utf-8?Q?This_is_an_email_test?= Reply-To: "[email protected]" X-Sender: [email protected] X-Mailer: CodeIgniter X-Priority: 3 (Normal) Message-ID: <[email protected]> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit It is working. Great! where is the problem?
[eluser]gazza7364[/eluser]
Quote: $config=array( Hi I have looked at my email which uses googlemail, as yours does and the port I am using is 465, where you are using 456. Try changing to see if it works.
[eluser]Ayeyermaw[/eluser]
gazza is correct in that you have the port wrong. You also my not have openssl enabled on your php install. I see you use wamp but I don't know how that configuration works. Perhaps a quick google on enabling opensll in wamp will give you the answer - assuming it still doesn't work after you enter the correct port
|
Welcome Guest, Not a member yet? Register Sign In |