Hi i get successful to use internal smtp account login( or external also if you need it’s the same ) to send mail.
I use Magento 1.1.3
My problem was that i received the mail sent to account of the server where magento run. But sending to external mail address i get back the email beacouse of anonymous sender.
2a) New getMail() function (added a block of code to specify smtp config):
public function getMail() { if (is_null($this->_mail)) {
/*Start of added code to specify config*/ $my_smtp_host = Mage::getStoreConfig('system/smtp/host'); // Take it from Magento backoffice or you can specify it here $my_smtp_port = Mage::getStoreConfig('system/smtp/port'); // Take it from Magento backoffice or you can specify it here
I had little success with Magento’s built in mailer, even with the suggestions to customize Transport.php / modify Zend/Mime.php
I’ve been working on a personal machine going out through Comcast for demo/testing purposes, however even setting it to go out through comcast.net’s mailservers, with the authentication as recommended in other posts didn’t work.
I ended up sniffing the packets and found two main problems.
The first problem was that it seemed to get stuck sending the DATA section, it would authenticate fine, then stick, I think eventually the TCP/IP or SMTP connection would time out (the browser would seem to hang for a while).
The second problem I ran into (some time afterwards, and I’m not sure why this one happened) was some how it was messing up the MAIL FROM: line, saying “MAIL FROM: <Owner <myemailaddress@comcast.net>>” (note the multiple ‘<’ and ‘>’ characters) when it should have said “MAIL FROM: Owner <myemailaddress@comcast.net>”
I ended up using PHPMailer version 2.1 (for PHP5) and replaced all of the Zend mailer code with the appropriate PHP Mailer calls and it worked (I did do this in a custom module, overriding the Core/Model/Email/Template.php send method, although it would probably work inline under the core, if you want to hack the core—I didn’t because I didn’t want my code to get overridden in some future upgrade that might touch that file—again if you want to hack the core, it will probably work as long as you put the PHPMailer classes, plus its language directory in an appropriate place).
Hallelujah after several days at this. And THANK GOD for PHPMailer!
p.s. I could probably assist someone if they need help with this, send me a note.
Having the same problem, not able to send emails out. Running on a windows machine with magento 1.1.4. Came across this extension which adds advanced smtp details to the admin:
After days I got the transactional emails to work:
I used Miro’s Code (from Page1) and commented ‘ssl’ => ‘tls’ out… this line created a STARTTLS error in my SMTP-Engine.
Hi i get successful to use internal smtp account login( or external also if you need it’s the same ) to send mail.
I use Magento 1.1.3
My problem was that i received the mail sent to account of the server where magento run. But sending to external mail address i get back the email beacouse of anonymous sender.
2a) New getMail() function (added a block of code to specify smtp config):
public function getMail() { if (is_null($this->_mail)) {
/*Start of added code to specify config*/ $my_smtp_host = Mage::getStoreConfig('system/smtp/host'); // Take it from Magento backoffice or you can specify it here $my_smtp_port = Mage::getStoreConfig('system/smtp/port'); // Take it from Magento backoffice or you can specify it here
I’ve tried EVERYTHING and nothing works to me. I’ve tried these codes above, but nothing happens… just:
“Unable to submit your request. Please, try again later”
It shows some specific fields to use smtp, but didn’t work to me.
I can’t send email through mail() nor SMTP. I don’t know what to try anymore................ =`(
My Host said the mail() - php function - only works if the FROM field in the header is some email hosted in my server(avesportes.com), if not, the function doesn’t work.
So if I tried to buy something with another email, eg. , I don’t get any email confirmation(as a Costumer nor Administrator).
BUT if I use some email hosted, eg. , it works! But I still don’t get the confirmation(as a Administrator)… Just as a Costumer.
Its really strange. And I tried ALL codes to do the SMTP work, but unsuccessfully…
Olá André. Pelo teu site suponho que sejas português. Esse era o mesmo problema que eu tinha: o meu servidor só enviava mails com o from com um domínio daquela máquina. Consegui contornar o problema com a solução do JB7TS. Tenta aplicar novamente essa solução calmamente e verificando todos os promenores. Basicamente o que estás a fazer com essa solução é autenticares-te perante o servidor, o que normalmente é suficiente para enviar o e-mail.
Olá Hercilio, Sou brasileiro na verdade…
Obrigado pela resposta. Vi que aquela solução funcionou para você. Eu
fiz EXATAMENTE o que pede lá mas o email não envia.
Quando faço aquelas configurações a loja sabe que deve enviar através
do SMTP ao invés do mail()? Pq não funciona....... :(
Já não sei mais o que fazer. Obrigado pela atenção.
I was able to narrow down the problem to my host. I had ubuntu and it didnt want to send emails without this hack. and even with this hack, it didnt want to send newsletters.
So guess what? I switched the server this weekend to a different provider that uses CentOS, reinstalled it all and now it works like a charm!
Btw, if anyone is looking for a good dedicated affordable host in the UK, i found http://www.Coreix.net that install all the latest php/zend optimiser/apache etc - i only had to install PDO_Mysql myself to get magento working and they pointed me into the right direction to do that. I am sure if you specify this to be installed, it will be done too!
cant be happier now, compared to the old ubuntu and webfusion, its like a breath of fresh air.
whoohooo!!!!
I will post soon my web when we finish development next week! In mean time, if you like to have a read about my nightmare with webfusion, please check it out on my blog: http://www.vadim.co.uk/blog/static/298
Stay everyone away from them, unless you are particularly looking to entertain yourself by observing people’s stupidity
Any news on an official release to allow you to use an external smtp server? i.e. google apps?
I ask as the mail server used on the current server is prone to have it’s email marked as SPAM and this is absolutely disastrous. I need to use my google apps smtp server!
varien, let us know.. we appreciate everything takes man hours..
twiddling my thumbs as i wait for all the hard work to come to fruition…