I've been trying to get the smoke tests working on my server. the Unit tests "all tests" works no problem, but the smoke test fails with the following error
"Error: The SMTP connection failed to start [tls://smtp.gmail.com:465]: fsockopen returned Error Number 13 and Error String 'Permission denied'
Log Information
++ Log level changed to 4
++ Forcing ESMTP mode. HELO is EHLO.
++ Forcing ESMTP mode. HELO is EHLO.
++ Trying to connect...
++ Trying to connect to SMTP server at 'tls://smtp.gmail.com:465
!! The SMTP connection failed to start [tls://smtp.gmail.com:465]: fsockopen returned Error Number 13 and Error String 'Permission denied'
"
I have tried both ssl and tls connections, and neither was successful.
The interesting thing is that looking at the output from basic send, the sender and sendto fields are blank (which is a hint to the problem
"A basic, 7 bit ascii email will be sent from Swift, to the account given in the test configuration. Simply open up the email and check that the details given below are accurate:
* The subject of the message is "Smoke Test 1 - Basic"
* The sender of the message is ""
* The recipient in the To: header is ""
* The message body is
"This is just a basic test
It has two lines and no special non-ascii characters."
* The Date: header relects the date on the server.
".
However, I have provided this data in the testconfiguration.php
Here is the testconfiguration, though I have edited my e-mail address and password.
Code: Select all
* The location of the Swift library directory
*/
const SWIFT_LIBRARY_PATH = DEFAULT_LIBRARY_PATH;
/**
* The location of some files used in testing.
*/
const FILES_PATH = FILES_PATH;
/*
* EVERYTHING BELOW IS FOR SMOKE TESTING ONLY
*/
/**
* The connection tye to use in testing
* "smtp", "sendmail" or "nativemail"
*/
const CONNECTION_TYPE = "smtp";
/**
* An address to send emails from
*/
const FROM_ADDRESS = "pete@mydomain.com";
/**
* The name of the sender
*/
const FROM_NAME = "Pete Field - from";
/**
* An address to send emails to
*/
const TO_ADDRESS = "pete@otheraddress.com";
/**
* The name of the recipient
*/
const TO_NAME = "Pete Field- to";
/*
* SMTP SETTINGS - IF APPLICABLE
*/
/**
* The FQDN of the host
*/
const SMTP_HOST = "smtp.gmail.com";
/**
* The remote port of the SMTP server
*/
const SMTP_PORT = 465;
/**
* Encryption to use if any
* "ssl", "tls" or false
*/
const SMTP_ENCRYPTION = "tls";
/**
* A username for SMTP, if any
*/
const SMTP_USER = "pete@mydomain.com";
/**
* Password for SMTP, if any
*/
const SMTP_PASS = "password";
/*
* SENDMAIL BINARY SETTINGS - IF APPLICABLE
*/
/**
* The path to sendmail, including the -bs options
*/
const SENDMAIL_PATH = "/usr/sbin/sendmail -bs";
}
