Sending Email through CodeIgniter












0















I want to send a mail through Tank Auth(a CodeIgniter library)



I am getting the error:




A PHP Error was encountered Severity: Warning



Message: fsockopen() [function.fsockopen]: unable to connect to
ssl://smtp.googlemail.com:465 (Unable to find the socket transport
"ssl" - did you forget to enable it when you configured PHP?)



Filename: libraries/Email.php



Line Number: 1689




i am using gmail



my php.ini file has the line without comment




extension=php_openssl.dll




some conf in Email.php:



var $useragent      = "CodeIgniter";    
var $mailpath = "/usr/sbin/sendmail";//i dont know what should i write here
var $protocol = "smtp";
var $smtp_host = "ssl://smtp.gmail.com";
var $smtp_user = "mymail@gmail.com";
var $smtp_pass = "mypass";
var $smtp_port = "465";
var $smtp_timeout = 30;
var $smtp_crypto = "";
var $wordwrap = TRUE;
var $wrapchars = "76";
var $mailtype = "text";
var $charset = "utf-8";
var $multipart = "mixed";
var $alt_message = '';
var $validate = FALSE;
var $priority = "3";
var $newline = "rn";
var $crlf = "n";


where might the problem be?










share|improve this question























  • See here stackoverflow.com/questions/1705856/…

    – Shaun Hare
    Apr 27 '12 at 7:20











  • No chance for now, i can not see php logs too :S

    – merveotesi
    Apr 27 '12 at 8:23
















0















I want to send a mail through Tank Auth(a CodeIgniter library)



I am getting the error:




A PHP Error was encountered Severity: Warning



Message: fsockopen() [function.fsockopen]: unable to connect to
ssl://smtp.googlemail.com:465 (Unable to find the socket transport
"ssl" - did you forget to enable it when you configured PHP?)



Filename: libraries/Email.php



Line Number: 1689




i am using gmail



my php.ini file has the line without comment




extension=php_openssl.dll




some conf in Email.php:



var $useragent      = "CodeIgniter";    
var $mailpath = "/usr/sbin/sendmail";//i dont know what should i write here
var $protocol = "smtp";
var $smtp_host = "ssl://smtp.gmail.com";
var $smtp_user = "mymail@gmail.com";
var $smtp_pass = "mypass";
var $smtp_port = "465";
var $smtp_timeout = 30;
var $smtp_crypto = "";
var $wordwrap = TRUE;
var $wrapchars = "76";
var $mailtype = "text";
var $charset = "utf-8";
var $multipart = "mixed";
var $alt_message = '';
var $validate = FALSE;
var $priority = "3";
var $newline = "rn";
var $crlf = "n";


where might the problem be?










share|improve this question























  • See here stackoverflow.com/questions/1705856/…

    – Shaun Hare
    Apr 27 '12 at 7:20











  • No chance for now, i can not see php logs too :S

    – merveotesi
    Apr 27 '12 at 8:23














0












0








0








I want to send a mail through Tank Auth(a CodeIgniter library)



I am getting the error:




A PHP Error was encountered Severity: Warning



Message: fsockopen() [function.fsockopen]: unable to connect to
ssl://smtp.googlemail.com:465 (Unable to find the socket transport
"ssl" - did you forget to enable it when you configured PHP?)



Filename: libraries/Email.php



Line Number: 1689




i am using gmail



my php.ini file has the line without comment




extension=php_openssl.dll




some conf in Email.php:



var $useragent      = "CodeIgniter";    
var $mailpath = "/usr/sbin/sendmail";//i dont know what should i write here
var $protocol = "smtp";
var $smtp_host = "ssl://smtp.gmail.com";
var $smtp_user = "mymail@gmail.com";
var $smtp_pass = "mypass";
var $smtp_port = "465";
var $smtp_timeout = 30;
var $smtp_crypto = "";
var $wordwrap = TRUE;
var $wrapchars = "76";
var $mailtype = "text";
var $charset = "utf-8";
var $multipart = "mixed";
var $alt_message = '';
var $validate = FALSE;
var $priority = "3";
var $newline = "rn";
var $crlf = "n";


where might the problem be?










share|improve this question














I want to send a mail through Tank Auth(a CodeIgniter library)



I am getting the error:




A PHP Error was encountered Severity: Warning



Message: fsockopen() [function.fsockopen]: unable to connect to
ssl://smtp.googlemail.com:465 (Unable to find the socket transport
"ssl" - did you forget to enable it when you configured PHP?)



Filename: libraries/Email.php



Line Number: 1689




i am using gmail



my php.ini file has the line without comment




extension=php_openssl.dll




some conf in Email.php:



var $useragent      = "CodeIgniter";    
var $mailpath = "/usr/sbin/sendmail";//i dont know what should i write here
var $protocol = "smtp";
var $smtp_host = "ssl://smtp.gmail.com";
var $smtp_user = "mymail@gmail.com";
var $smtp_pass = "mypass";
var $smtp_port = "465";
var $smtp_timeout = 30;
var $smtp_crypto = "";
var $wordwrap = TRUE;
var $wrapchars = "76";
var $mailtype = "text";
var $charset = "utf-8";
var $multipart = "mixed";
var $alt_message = '';
var $validate = FALSE;
var $priority = "3";
var $newline = "rn";
var $crlf = "n";


where might the problem be?







php codeigniter smtp






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Apr 27 '12 at 7:16









merveotesimerveotesi

967114376




967114376













  • See here stackoverflow.com/questions/1705856/…

    – Shaun Hare
    Apr 27 '12 at 7:20











  • No chance for now, i can not see php logs too :S

    – merveotesi
    Apr 27 '12 at 8:23



















  • See here stackoverflow.com/questions/1705856/…

    – Shaun Hare
    Apr 27 '12 at 7:20











  • No chance for now, i can not see php logs too :S

    – merveotesi
    Apr 27 '12 at 8:23

















See here stackoverflow.com/questions/1705856/…

– Shaun Hare
Apr 27 '12 at 7:20





See here stackoverflow.com/questions/1705856/…

– Shaun Hare
Apr 27 '12 at 7:20













No chance for now, i can not see php logs too :S

– merveotesi
Apr 27 '12 at 8:23





No chance for now, i can not see php logs too :S

– merveotesi
Apr 27 '12 at 8:23












3 Answers
3






active

oldest

votes


















0














I would try and reinstall openssl extension on windows http://code.google.com/p/openssl-for-windows/






share|improve this answer































    0














    edit your code line from



    var $smtp_host  = "ssl://smtp.gmail.com";  


    to



    var $smtp_host  = "ssl://smtp.googlemail.com"; 


    i think it will work






    share|improve this answer































      0














      To use Google SMTP in CodeIgniter you need to make 2 (two) changes into your Gmail account setting: (N.B. Please be aware that it is now easier for an attacker to break into your account -says Google)




      1. Set off 2-step Verification.

      2. Allow less secure apps: ON (or Enable)






      share|improve this answer























        Your Answer






        StackExchange.ifUsing("editor", function () {
        StackExchange.using("externalEditor", function () {
        StackExchange.using("snippets", function () {
        StackExchange.snippets.init();
        });
        });
        }, "code-snippets");

        StackExchange.ready(function() {
        var channelOptions = {
        tags: "".split(" "),
        id: "1"
        };
        initTagRenderer("".split(" "), "".split(" "), channelOptions);

        StackExchange.using("externalEditor", function() {
        // Have to fire editor after snippets, if snippets enabled
        if (StackExchange.settings.snippets.snippetsEnabled) {
        StackExchange.using("snippets", function() {
        createEditor();
        });
        }
        else {
        createEditor();
        }
        });

        function createEditor() {
        StackExchange.prepareEditor({
        heartbeatType: 'answer',
        autoActivateHeartbeat: false,
        convertImagesToLinks: true,
        noModals: true,
        showLowRepImageUploadWarning: true,
        reputationToPostImages: 10,
        bindNavPrevention: true,
        postfix: "",
        imageUploader: {
        brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
        contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
        allowUrls: true
        },
        onDemand: true,
        discardSelector: ".discard-answer"
        ,immediatelyShowMarkdownHelp:true
        });


        }
        });














        draft saved

        draft discarded


















        StackExchange.ready(
        function () {
        StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f10346353%2fsending-email-through-codeigniter%23new-answer', 'question_page');
        }
        );

        Post as a guest















        Required, but never shown

























        3 Answers
        3






        active

        oldest

        votes








        3 Answers
        3






        active

        oldest

        votes









        active

        oldest

        votes






        active

        oldest

        votes









        0














        I would try and reinstall openssl extension on windows http://code.google.com/p/openssl-for-windows/






        share|improve this answer




























          0














          I would try and reinstall openssl extension on windows http://code.google.com/p/openssl-for-windows/






          share|improve this answer


























            0












            0








            0







            I would try and reinstall openssl extension on windows http://code.google.com/p/openssl-for-windows/






            share|improve this answer













            I would try and reinstall openssl extension on windows http://code.google.com/p/openssl-for-windows/







            share|improve this answer












            share|improve this answer



            share|improve this answer










            answered Apr 27 '12 at 7:22









            Shaun HareShaun Hare

            3,27321734




            3,27321734

























                0














                edit your code line from



                var $smtp_host  = "ssl://smtp.gmail.com";  


                to



                var $smtp_host  = "ssl://smtp.googlemail.com"; 


                i think it will work






                share|improve this answer




























                  0














                  edit your code line from



                  var $smtp_host  = "ssl://smtp.gmail.com";  


                  to



                  var $smtp_host  = "ssl://smtp.googlemail.com"; 


                  i think it will work






                  share|improve this answer


























                    0












                    0








                    0







                    edit your code line from



                    var $smtp_host  = "ssl://smtp.gmail.com";  


                    to



                    var $smtp_host  = "ssl://smtp.googlemail.com"; 


                    i think it will work






                    share|improve this answer













                    edit your code line from



                    var $smtp_host  = "ssl://smtp.gmail.com";  


                    to



                    var $smtp_host  = "ssl://smtp.googlemail.com"; 


                    i think it will work







                    share|improve this answer












                    share|improve this answer



                    share|improve this answer










                    answered Jan 16 '13 at 2:20









                    Med7atMed7at

                    4421616




                    4421616























                        0














                        To use Google SMTP in CodeIgniter you need to make 2 (two) changes into your Gmail account setting: (N.B. Please be aware that it is now easier for an attacker to break into your account -says Google)




                        1. Set off 2-step Verification.

                        2. Allow less secure apps: ON (or Enable)






                        share|improve this answer




























                          0














                          To use Google SMTP in CodeIgniter you need to make 2 (two) changes into your Gmail account setting: (N.B. Please be aware that it is now easier for an attacker to break into your account -says Google)




                          1. Set off 2-step Verification.

                          2. Allow less secure apps: ON (or Enable)






                          share|improve this answer


























                            0












                            0








                            0







                            To use Google SMTP in CodeIgniter you need to make 2 (two) changes into your Gmail account setting: (N.B. Please be aware that it is now easier for an attacker to break into your account -says Google)




                            1. Set off 2-step Verification.

                            2. Allow less secure apps: ON (or Enable)






                            share|improve this answer













                            To use Google SMTP in CodeIgniter you need to make 2 (two) changes into your Gmail account setting: (N.B. Please be aware that it is now easier for an attacker to break into your account -says Google)




                            1. Set off 2-step Verification.

                            2. Allow less secure apps: ON (or Enable)







                            share|improve this answer












                            share|improve this answer



                            share|improve this answer










                            answered Jan 3 at 4:06









                            JohnineJohnine

                            509




                            509






























                                draft saved

                                draft discarded




















































                                Thanks for contributing an answer to Stack Overflow!


                                • Please be sure to answer the question. Provide details and share your research!

                                But avoid



                                • Asking for help, clarification, or responding to other answers.

                                • Making statements based on opinion; back them up with references or personal experience.


                                To learn more, see our tips on writing great answers.




                                draft saved


                                draft discarded














                                StackExchange.ready(
                                function () {
                                StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f10346353%2fsending-email-through-codeigniter%23new-answer', 'question_page');
                                }
                                );

                                Post as a guest















                                Required, but never shown





















































                                Required, but never shown














                                Required, but never shown












                                Required, but never shown







                                Required, but never shown

































                                Required, but never shown














                                Required, but never shown












                                Required, but never shown







                                Required, but never shown







                                Popular posts from this blog

                                generate and download xml file after input submit (php and mysql) - JPK

                                Angular Downloading a file using contenturl with Basic Authentication

                                Can't read property showImagePicker of undefined in react native iOS