Core Settings - SMTP setup

I use the gmail SMTP server, but am not able to enter all the required info in the core settings mask and as a consequence mail confirmations fail. The following info is required:

Host = “ssl://smtp.gmail.com”; // specify main server
Port = 465; // set the port to use
SMTPAuth = true; // turn on SMTP authentication
Username = "[email protected]"; // your SMTP username or your gmail username
Password = “tr55@we4”; // your SMTP password or your gmail password

Any guidance would be much appreciated.

Hi,

you can’t use an SMTP which is not located on the server where your shop is installed.
Means - gmail won’t work as you can’t use it as an email relay with or w/o all requested data.

Regards

Hi Marco and thanks for your quick reply. I implement the following code in other projects I have written to send out email via gmail also using phpmailer. Works without problems both on localhost and live server:

<?php
$first_name=$_POST[‘first_name’];
$last_name=$_POST[‘last_name’];
$email=$_POST[‘email’];
$emailto=$_POST[‘emailto’];
$subject=$_POST[‘subject’];
$message=$_POST[‘message’];
include"class.smtp.php"; // optional, gets called from within class.phpmailer.php if not already loaded
include"class.phpmailer.php"; // include “PHPMailer_v2.0.0/class.phpmailer.php”;
$mail = new PHPMailer();
$mail->IsSMTP(); // set mailer to use SMTP
$mail->Host = “ssl://smtp.gmail.com”; // specify main server
$mail->Port = 465; // set the port to use
$mail->SMTPAuth = true; // turn on SMTP authentication
$mail->Username = "[email protected]"; // your SMTP username or your gmail username
$mail->Password = “9?4DFgcml”; // your SMTP password or your gmail password
$from = “$email”; // Reply to this email
$to="$emailto"; // Recipients email ID
//$name="$first_name $last_name"; // Recipient’s name
//$mail->From = $from;
$mail->FromName = $email; // Name to indicate where the email came from when the recepient received
$mail->AddAddress($to);
//$mail->AddReplyTo($from);
$mail->WordWrap = 25; // set word wrap
$mail->IsHTML(true); // send as HTML
$mail->Subject = “$subject”;
$mail->Body = “$message”; //HTML Body
$mail->AltBody = “$message”; //Text Body
if(!$mail->Send())
{
echo “Mailer Error: " . $mail->ErrorInfo;
}
else
{
echo “Message has been sent”;
echo’<br/>’;
echo " by:$first_name $last_name”;
echo’<br/>’;
echo " to:$emailto";
echo’<br/>’;
echo " Subject:$subject";
echo’<br/>’;
echo " Message:$message";
echo’<hr>’;
}
?>

Gmail requires PORT=465 and also SMTPAuth = true, however these parameters are not accounted for in the core settings mask. Is it possible to hard code these values within your code?

Regards,

Tim

Hi,

just wondering that it should be possible with gmail…
Yep - you may want to try to write a module. Think /core/oxemail.php shall be the right place.

Regards

If you do not need encrypted transfer, i think it should work with just “smtp.gmail.com”. This is on standard port, SMTPAuth is switched on per default by OXID.
But i think google will rewrite the sender name to your gmail address.

Hi again,

somebody told me that an entry like this ssl://smtp.gmail.com:465 shall work perfectly. No module, no code needed.

Regards