keerthi1125 Posted September 30, 2021 Share Posted September 30, 2021 Hi, I couldn’t send campaign in php list.It shows smtp connection failed error. I have done an smtp connection in config.php file still i couldn,t clear the error. How to set smtp in phplist without this error while sending test mail? It shows error like this Sent test mail to: abcd@gmail.com FAILED please help me how to setup smtp in config.php to send mail and also to clear the error as soon as possible. my config.php code is Quote <?php /* ** ==============================================================================================================* ** The minimum requirements to get phpList working are in this file.* ** If you are interested in tweaking more options, check out the config_extended.php file* ** or visit http://resources.phplist.com/system/config* ** ** NOTE: To use options from config_extended.php, you need to copy them to this file *** ============================================================================================================== */ // what is your Mysql database server hostname $database_host = ‘localhost’; // what is the name of the database we are using $database_name = ‘pritdigi_phplistdb’; // what user has access to this database $database_user = ‘pritdigi_phplist’; // and what is the password to login to control the database $database_password = ‘prince@444’; // if you have an SMTP server, set it here. Otherwise it will use the normal php mail() function //# if your SMTP server is called “smtp.mydomain.com” you enter this below like this: //# //# define(“PHPMAILERHOST”,‘smtp.mydomain.com’); define(‘PHPMAILERHOST’, ‘localhost’); define(‘PHPMAILERPORT’,2500); define(‘PHPMAILER_SECURE’,false); // if TEST is set to 1 (not 0) it will not actually send ANY messages, but display what it would have sent // this is here, to make sure you edited the config file and mails are not sent “accidentally” // on unmanaged systems define(‘TEST’, 0); /* ============================================================================================================== ** Settings for handling bounces* ** This section is OPTIONAL, and not necessary to send out mailings, but it is highly recommended to correctly* ** set up bounce processing. Without processing of bounces your system will end up sending large amounts of* ** unnecessary messages, which overloads your own server, the receiving servers and internet traffic as a whole* ============================================================================================================== */ // Message envelope. // This is the address that most bounces will be delivered to // Your should make this an address that no PERSON reads // but a mailbox that phpList can empty every so often, to process the bounces // $message_envelope = ‘listbounces@yourdomain’; // Handling bounces. Check README.bounces for more info // This can be ‘pop’ or ‘mbox’ $bounce_protocol = ‘pop’; // set this to 0, if you set up a cron to download bounces regularly by using the // commandline option. If this is 0, users cannot run the page from the web // frontend. Read README.commandline to find out how to set it up on the // commandline define(‘MANUALLY_PROCESS_BOUNCES’, 1); // when the protocol is pop, specify these three $bounce_mailbox_host = ‘localhost’; $bounce_mailbox_user = ‘popuser’; $bounce_mailbox_password = ‘password’; // the “port” is the remote port of the connection to retrieve the emails // the default should be fine but if it doesn’t work, you can try the second // one. To do that, add a # before the first line and take off the one before the // second line $bounce_mailbox_port = ‘110/pop3/notls’; //$bounce_mailbox_port = “110/pop3”; // it’s getting more common to have secure connections, in which case you probably want to use //$bounce_mailbox_port = “995/pop3/ssl/novalidate-cert”; // when the protocol is mbox specify this one // it needs to be a local file in mbox format, accessible to your webserver user $bounce_mailbox = ‘/var/mail/listbounces’; // set this to 0 if you want to keep your messages in the mailbox. this is potentially // a problem, because bounces will be counted multiple times, so only do this if you are // testing things. $bounce_mailbox_purge = 1; // set this to 0 if you want to keep unprocessed messages in the mailbox. Unprocessed // messages are messages that could not be matched with a user in the system // messages are still downloaded into phpList, so it is safe to delete them from // the mailbox and view them in phpList $bounce_mailbox_purge_unprocessed = 1; // how many bounces in a row need to have occurred for a user to be marked unconfirmed $bounce_unsubscribe_threshold = 5; // choose the hash method for password // check the extended config for more info // in most cases, it is fine to leave this as it is define(‘HASH_ALGO’, ‘sha256’); please help if there is any error in code. Thanks in advance keerthi Quote Link to comment Share on other sites More sharing options...
requinix Posted September 30, 2021 Share Posted September 30, 2021 If it can't connect then apparently define('PHPMAILERHOST', 'localhost'); define('PHPMAILERPORT',2500); define('PHPMAILER_SECURE',false); those settings are wrong. Do you really have a mail server running on localhost? And it uses the unusual port 2500? Quote Link to comment Share on other sites More sharing options...
keerthi1125 Posted October 1, 2021 Author Share Posted October 1, 2021 No i am doing in live server. Where to setup smtp connection in the config.php code. Quote Link to comment Share on other sites More sharing options...
gizmola Posted October 2, 2021 Share Posted October 2, 2021 23 hours ago, keerthi1125 said: No i am doing in live server. Where to setup smtp connection in the config.php code. If you don't know the specifics of how you will send email from your servers, we certainly won't. Do you run your own MTA for the domain you will be sending these emails from? If you don't, will you use a remailer system? Configurations are totally different. As Requinix helpfully isolated for you, there are configuration variables you need to set correctly. Phplist is based on phpmailer, so understanding the way variables are mapped might include referencing the phpmailer manual, although to be clear, phplist is mapping its configuration to phpmailer. Either way, you have to communicate to us how you will send outbound emails. By default, it's going to fall through to trying to use the php mail() command, which looks for a local mta on the server. Setting up an mta to actually send mail, not to mention setting it up correctly so that email actually gets delivered and not rejected outright or marked as spam is not a simple thing, and in a hosted environment, outbound email from hosted servers is often outright blocked, to prevent hosting resources from sending spam, which can get the ISP's servers and IP's on RBL lists. If you have the answers to these questions, let us know and we might be able to help you further. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.