Welcome Guest, Not a member yet? Register   Sign In
SMTP Email on Windows Machine
#1

[eluser]Unknown[/eluser]
Hiya,

I would be very grateful if anybody could lend some advice on getting the Email class to run on a windows machine (normal WAMP thing) using the SMTP protocol. Many apologies if this is not the best section to make this request in. I've searched the forum and see that a few people have had time out issues when trying to use SMTP on windows boxes but didn't find any solution.

I'm experiencing a timeout issue on the second fgets (line 1610 on V1.6.3), after the EHLO is sent. I've extended it up to 120 to no avail. I've connected to the mail server via telnet and it's fine and nothing seems out of the ordinary. I was wondering if anybody could think of anything I maybe missing. Many thanks in advance.

Andy.
#2

[eluser]Bogdan Tanase[/eluser]
Hi,

I've experienced similar problems with email class, and eventually I gave up and used Swift.

I would also be curious what is the cause of email class not working properly with SMTP on win.
#3

[eluser]kyko[/eluser]
Hello,

I've used CDONTS from windows. Here's my code.

Code:
function pushMail($mailFrom, $mailTo, $mailSubj, $mailBody)
    {
        // This method is using CDONTS of Windows Server
        $newMail = new COM("CDONTS.NewMail") or die("Unable to get DCOM object!");
        $newMail->From = $mailFrom;
        $newMail->To= $mailTo;
        $newMail->Subject = $mailSubj;
        // Sets the mail format to HTML
        $newMail->BodyFormat = 0;
        $newMail->MailFormat = 0;
        $newMail->Body= $mailBody;
        $newMail->Send;
        $newMail = NULL;

        return TRUE;
    }
#4

[eluser]Unknown[/eluser]
Hiya,

Many thanks for the replies. Thanks kyko for the code, my development servers running XP so I guess I would have to use the newer CDOSYS. I must admit I haven't tried it at the moment to see if it'll work the same. I'd love to still use the CI class as it'll allow for a smoother transition when I switch servers. Oh well, I'll keep plodding on until I find a solution. Thanks,

Andy.
#5

[eluser]SitesByJoe[/eluser]
I've come to understand (there is a noted CI bug) that if you are using SMTP you need to skip the "initialize" routine and add your configuration array during the library call instead of afterwards.

Code:
$this->load->library('email', $config);




Theme © iAndrew 2016 - Forum software by © MyBB