I am referencing version 6.4.1
I would like to ask if you can add two settings to the Global_Parameters->Mailing configuration.
The first is to allow the Helo line to be configured and the second is to allow turning off the SMTPSecure setting.
Please see code snippet below from projeqtor.php for the modifications I needed to get this working for my mail smtp server. Line 4 is added, line 12 is commented out
$phpmailer = new PHPMailer ();
ob_start ();
if ($logLevel>='3') $phpmailer->SMTPDebug=1;
$phpmailer->Helo = '['.$_SERVER['SERVER_ADDR'].']';
$phpmailer->isSMTP (); // Set mailer to use SMTP
$phpmailer->Host = $paramMailSmtpServer; // Specify main smtp server
$phpmailer->Port = $paramMailSmtpPort;
if ($paramMailSmtpUsername and $paramMailSmtpPassword) {
$phpmailer->SMTPAuth = true; // Enable SMTP authentication
$phpmailer->Username = $paramMailSmtpUsername; // SMTP username
$phpmailer->Password = $paramMailSmtpPassword; // SMTP password
# $phpmailer->SMTPSecure = 'tls'; // default (for ports 25 and 587
if ($paramMailSmtpPort == '465')
$phpmailer->SMTPSecure = 'ssl'; // 465 is default for ssl
if (strpos ( $phpmailer->Host, '://' )!==false) {
$phpmailer->SMTPSecure = substr ( $phpmailer->Host, 0, strpos ( $phpmailer->Host, '://' ) );
if ($phpmailer->SMTPSecure=="smtp") $phpmailer->SMTPSecure="";
$phpmailer->Host = substr ( $phpmailer->Host, strpos ( $phpmailer->Host, '://' ) + 3 );
}
}
For the Helo line it should default to the hostname, as it does by default in PHPMailer. I needed to use the IP address here.
SMTPSecure should just be a configuration flag, on/off.
Hi,
I don't understand why you had to configure the Helo
To change mode, just specify it in host name parameter : ssl://hostname or tls://hostname or smtp://hostname
I will try smtp://hostname. I was not aware that this would have the same effect.
The Helo line allows the use of a godaddy workspace email account to send email. Godaddy has some rules setup to block outside smtp relay, even if you have valid email account credentials. Setting the client server Helo line as I have here gets around this and allows the connection. The default Helo line provided by PHPMailer is set to serverHostname(), which in my case is not correct, and godaddy rejects the connection. So a way to provide 'Server Hostname' manually is what would be needed.
Here is a little more info...
Your HELO/EHLO name should be the system's fully-qualified domain name.
RFC2821
These commands are used to identify the SMTP client to the SMTP server. The argument field contains the fully-qualified domain name of the SMTP client if one is available. In situations in which the SMTP client system does not have a meaningful domain name (e.g., when its address is dynamically allocated and no reverse mapping record is available), the client SHOULD send an address literal (see section 4.1.3), optionally followed by information that will help to identify the client system. The SMTP server identifies itself to the SMTP client in the connection greeting reply and in the response to this command. (the "address literal" is the address in brackets ([192.0.2.1]), or for v6 the address with an IPv6 prefix ([IPv6:fe80::1]))
En poursuivant votre navigation, vous acceptez le dépôt de cookies tiers destinés au bon fonctionnement et à la sécurisation du site (gestion de session, reCaptcha) et à une analyse statistique anonymisée des accès sur notre site (Google Analytics). Si vous vous inscrivez, les informations que vous fournirez ne seront jamais divulguées à un tiers sous quelque forme que ce soit. En savoir plus
Cookies settings
×
Functional Cookies
Ce site utilise des cookies pour assurer son bon fonctionnement et ne peuvent pas être désactivés de nos systèmes. Nous ne les utilisons pas à des fins publicitaires. Si ces cookies sont bloqués, certaines parties du site ne pourront pas fonctionner.
Session
Please login to see yours activities!
Other cookies
Ce site web utilise un certain nombre de cookies pour gérer, par exemple, les sessions utilisateurs.