Mautic Community Forums

Cron job and email settings

Hello,



I am a newbe in using Mautic, wich looks great by the way.

I am trying to set conjobs and for the leadlist updates and mautic campaigns, i am receiving an error via email cronjob notiffication: “Could not open input file: /home/cristi/public_html/mautic/app/console mautic:campaigns:trigger --env=prod”



I set up the cronjob as follows:

/usr/local/bin/php -q “/home/cristi/public_html/mautic/app/console mautic:leadlists:update --env=prod”



/usr/local/bin/php -q “/home/cristi/public_html/mautic/app/console mautic:campaigns:update --env=prod”



/usr/local/bin/php -q “/home/cristi/public_html/mautic/app/console mautic:campaigns:trigger --env=prod”



Is something wrong there? ( iset this with help from my hosting provider)

Also i have problems setting up email client. I want to use Sparkpost (my domain is “ready to send” with them). Email settings inside mautic is set as follow:



Service to send mail through

Other SMTP Server



Test connection Send test email

SMTP host

smtp.sparkpostmail.com

SMTP port

587

SMTP encryption type

TLS



SMTP authentication mode

Login



Username for the selected mail service

SMTP_Injection



How should email be handled?

Send immediately



…i am receiving this error:

Connection could not be established with host smtp.sparkpostmail.com [Connection timed out #110] Log data: ++ Starting Swift_SmtpTransport !! Connection could not be established with host smtp.sparkpostmail.com [Connection timed out #110] (code: 0)

++ Starting Swift_SmtpTransport !! Connection could not be established with host smtp.sparkpostmail.com [Connection timed out #110] (code: 0)



I am not good in coding so any help will be like gold :)



Thanks

Looks like you can’t connect to their host:

I just ran a quick check to see if their service is listening on the address:port you mentioned and it is from where I sit.

If you are behind a network that can’t connect the host you may need a firewall (or proxy host) setup to send emails through sparkspost. (I’m setting this up now using mautic and sparkpost. I’ll post here if I have anything useful to add to this.)

# nc -vz smtp.sparkpostmail.com 587
found 0 associations
found 1 connections:
     1:	flags=82<CONNECTED,PREFERRED>
	outif en0
	src 192.168.64.176 port 54404
	dst 54.69.82.117 port 587
	rank info not available
	TCP aux info available

Connection to smtp.sparkpostmail.com port 587 [tcp/submission] succeeded!

Hello,

I am a newbe in using Mautic, wich looks great by the way.
I am trying to set conjobs and for the leadlist updates and mautic campaigns, i am receiving an error via email cronjob notiffication: “Could not open input file: /home/cristi/public_html/mautic/app/console mautic:campaigns:trigger --env=prod”

I set up the cronjob as follows:
/usr/local/bin/php -q “/home/cristi/public_html/mautic/app/console mautic:leadlists:update --env=prod”

/usr/local/bin/php -q “/home/cristi/public_html/mautic/app/console mautic:campaigns:update --env=prod”

/usr/local/bin/php -q “/home/cristi/public_html/mautic/app/console mautic:campaigns:trigger --env=prod”

Is something wrong there? ( iset this with help from my hosting provider)
Also i have problems setting up email client. I want to use Sparkpost (my domain is “ready to send” with them). Email settings inside mautic is set as follow:

Service to send mail through
Other SMTP Server

Test connection Send test email
SMTP host
smtp.sparkpostmail.com
SMTP port
587
SMTP encryption type
TLS

SMTP authentication mode
Login

Username for the selected mail service
SMTP_Injection

How should email be handled?
Send immediately

…i am receiving this error:
Connection could not be established with host smtp.sparkpostmail.com [Connection timed out #110] Log data: ++ Starting Swift_SmtpTransport !! Connection could not be established with host smtp.sparkpostmail.com [Connection timed out #110] (code: 0)
++ Starting Swift_SmtpTransport !! Connection could not be established with host smtp.sparkpostmail.com [Connection timed out #110] (code: 0)

I am not good in coding so any help will be like gold :slight_smile:

Thanks