Link to home
Start Free TrialLog in
Avatar of Silas2
Silas2

asked on

Email password question

I'm really mystified, not being anywhere near an smtp expert but, I'm using Magento, and there are various email accounts from which store emails go from, sales/shipping etc, but in the Magento config there is only mention of configuring the SMTP server and all the documentation  refers to 'SMTP mail server password', not the actual 'from' email account's passwords.

As far as I've always been aware, SMTP servers don't have passwords, only the actual email accounts do, that's right isn't it?
Avatar of noci
noci

An SMTP server CAN have passwords (MUST be combined with SSL/TLS to protect them) to allow sending from external parties.
It allows delivery from an external trusted mailserver into an internal trusted mailserver optionaly bypassing any filters you may use. It's a per session password not a per address password.

If your mailserver accepts mail from from this server then a password is not needed. (SSL & TLS) might still be a wise move though.
Avatar of Silas2

ASKER

So is it true that 'by default' , and I'm really referring to the standard cheapo Linux shared hosting package using CPanel, that a domain can relay mail thru the included mail server without a password?
I just would have thought that you wouldn't be able to do a legitimate 'From' without the credentials of the 'from' account even if it was on the same box.
ASKER CERTIFIED SOLUTION
Avatar of noci
noci

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Silas2

ASKER

So in your leaned opinion, and I know I'm being sneaky here because I know I haven't mentioned Magento before but no one in the Magento forums seems to be able to explain this: in Magento for the 'transaction' emails (shipping/order confirmation etc.) you setup the 'From' email accounts but with NO passwords, but you're supposed to "Configure your SMTP connection " with either 'None',''Login','MD5' authentication methods.
Would I have to configure the mail server itself to accept relaying for all the different sales@domain.com, shipping@domain.com by using an address range as you mention above?

(I know I'm pushing my luck by asking you this!)
Sorry i have no idea how magento works, but i do know SMTP.
I found this looking for mail from Magento... missing is where to send the mail... so that should be configured somewhere.
You should have a mailserver accepting & relaying mail from your Magento system, and configure that Magento server to send the mail to that  mailservers IP adress or DNS name.

            $email_template  = Mage::getModel('core/email_template')->loadDefault($template_id);
            /*load and template by giving its id
            it can be seen when creating a new transactional mail*/
                            $email_template_variables = array(
                               'customer_name' => $customer_name,
                         );

                       $sender_email = // set sender email
                       $sender_name =  // set sender name
                       $email_template->setSenderName($sender_name);
                       $email_template->setSenderEmail($sender_email); 
                       $email_template->send($email_to, $customer_name, $email_template_variables);

Open in new window

This is PHP code, probably needs a template associated (first line)
Avatar of Silas2

ASKER

Thanks for that. The ISP has been explaining it to me, and it is as you say. The mail server will relay in theory from any account, but in practice will only accept if its on the same data-center.
They changed the mail server to relay from I think and the old alias had changed so that the old cron jobs stopped working, that's why I started questioning