Access to logs in order to debug problem with PHPMailer and Sendgrid

Username (e.g. epiz_XXX) or Website URL

epiz_26016487

Other Information

I´m having a problem with PHPMailer and i need access to the PHP logs (or any kind of server side log that could shed some light on my problem).

I am running an Open Journal System (Open Journal Systems (OJS) - Software - Public Knowledge Project) which uses PHPMailer to send mails to the users.

I have set up a sendgrid account and added all necessary CNAME records to the DNS (sendgrid confirms that this is set correctly), the following are the settings for the PHP application:

smtp = On
smtp_server = smtp.sendgrid.net
smtp_port = 587
smtp_auth = tls
smtp_username = apikey
smtp_password =
; allow_envelope_sender = On
; default_envelope_sender = my_address@my_host.com
; force_default_envelope_sender = On
; force_dmarc_compliant_from = Off
time_between_emails = 3600
max_recipients = 10
require_validation = Off
validation_timeout = 14

(i have included the commented options in case its helpful to uncomment them)

Unfortunately, the site does not show any meaningful error when an email fails, forcing me to comb the logs… would it be possible to access them?

Thanks in advance!
Rafael

Hi and welcome to the forum

You can’t access the logs and what is written in them would not be useful to you

but you can enable debugging in phpmailer

4 Likes

Thanks OxyDac, i’ll try!

1 Like

Indeed! I set the PHPMailer smtp debug variable to value 2 and found out that the from address that is being used is not a verified sender identity.

Thanks @Oxy!

1 Like

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.