Jump to content
  • 0

SwiftMailer DKIM option


aakash singh

Question

Hello,
First I want to say that I cannot send SMTP from my shared hosting account. I use and setup Zoho Mail for my website, all mx, spf, dkim and dmarc are valid. Mail send from zoho is successfully delivered to recipient inbox. But when Blesta send out mail using the PHP option it goes to the recipient spam folder (gmail). Viewing the full email header from gmail shows that when sending mail using php it does not used zoho mail and instead use the default mail server on my shared hosting and spf, dkim and dmarc requested by gmail were failed.

So i think to resolve the issue i need to add my own dkim signature on the header mail send out by php. But i have no idea which file exactly send out emails for invoices, new signup, billings etc. So can anyone please point me to the direction which file i will edit to add my own signature?

Thanks

Link to comment
Share on other sites

4 answers to this question

Recommended Posts

  • 0

i wonder if a DMARC, DKIM and SPF would help.

DMARC

Host: _dmarc.domain.com
TTL: 43200
Text: v=DMARC1; p=quarantine; pct=50; adkim=strict; aspf=relaxed; rua=mailto:dmarc@domain.com; ruf=dmarc@domain.com

DKIM

http://dkimcore.org/specification.html & http://dkimcore.org/tools/

SPF

https://www.spfwizard.net

Link to comment
Share on other sites

  • 0
Quote

Viewing the full email header from gmail shows that when sending mail using php it does not used zoho mail and instead use the default mail server on my shared hosting and spf, dkim and dmarc requested by gmail were failed.
 

You can send mail by php function or SMTP ,if you select PHP as method for sending emails ofcourse it doesn't use zoho mail server..infact it doesn't use any mail server...it is  sent using php mail function.If you want to send emails with mail server you have to select SMTP and configure mail parameters properly ....username,password,hostname and port.I'm using office365  and didn't use zoho for quite long but as I remember you have to whitelist IP address in zoho control panel.

mail class is in blesta/components/email/email.php but you can't just  set dkim signature and expect  just to work...you have to add key to your MTA ..it is easier for you to set SMTP ....and may I ask why you can't send emails from your hosting account in first place...

Here is instructions from their site...as you see sending mail must match authentication email,so if you want to send emails from noreply@yourdomain.com and you are authenticate with admin@yourdomain.com or any similar usecase than you have to add sending mail as alias..also make sure to whitelist main server IP and hosting account IP (if are not same)

 SMTP Configuration settings for Zoho Mail - SSL

Outgoing Server Name: smtp.zoho.eu
Port: 465
Security Type: SSL 

Require Authentication: Yes. 

The email address should match the email address/ aliases of the account, for which the authentication details are provided. 

 SMTP Configuration settings for Zoho Mail - TLS

Outgoing Server Name: smtp.zoho.eu
Port: 587
Security Type: TLS 

Require Authentication: Yes. The email address should match the email address/ aliases of the account, for which the authentication details are provided

Link to comment
Share on other sites

  • 0

Thanks for trying to help. I finally figured the problem, my SPF entry was not fully correct, my fault.
 

v=spf1 include:zoho.com ~all

That is what Zoho wrote on their documentation. Scrolling a little bit down on the same page they have the correct entry, i must include my server IP.

v=spf1 include:zoho.com ip4:127.0.0.1 ~all

After that has been resolved, mail send using the PHP function did not goes to the SPAM folder in gmail anymore.

Link to comment
Share on other sites

  • 0

Well yes...in first case you authorize only zoho.com to send emails but you sent all your mails from localhost using PHP ,generaly in spf record  you should include  A records,IPv4 (address of your hosting account),mx record and + any remote smart host or smtp server you want relay in.

For example this will authorize one IP xx.xx..xx.xx  + all your A records in hosting account like mail.yourdomain.com and yourdomain.com  + mx records + zoho and mailjet

v=spf1 ip4:xx.xx.xx.xx +a +mx +include:spf.mailjet.com +include:zoho.com ~all

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...