Reputation: 3880
I've been struggling this for a week but still don't see any light. My company is using a google form to collect users' orders, and then send them emails regarding their order using GmailApp.sendEmail. The email includes a link to the product page on our website and a Paypal link for the users to make payment.
My company is using Google workplace emails, and all our emails are dkim authenticated and spf record is added(whatever it is..). I tried sending a same email to mailt-tester.com and it gets 10/10
However, when I sent these emails to Hotmail, they got into junk folder. I've tried changing my message and found out only when I removed the links would the emails get into inbox without problem. (Previously I had problem with Gmail too. I had had a paypal button's picture as link in the email, only after I removed that picture and changed the link to text link would the email get into Gmail's inbox)
Isn't paypal link or other links in an email message a common practice for many companies? Why would mine get into junk? Here is the code in app script, although I don't believe there is any problem with it:
function onWskSubmit(e){
ss = SpreadsheetApp.getActive();
let row = e.range.rowStart;
let email = ss.getRangeByName('payer_email').getValues()[row-1][0];
GmailApp.sendEmail(email,'Thanks for your order','ww',{
bcc:'[email protected]',
name:'company name',
replyTo:'[email protected]',
htmlBody:message(row)
})
}
function message(row){
....
....
let header = `
<p>Dear${name}:
<p style="text-indent:2em">Thanks for your oder. Your subtotal:</p>
<table>
<tr>
<th style="text-align:left;width:200px">item</th>
<th>fee</th>
</tr>
${items}
<tr>
<td>
Total
</td>
<td>
$${total}
</td>
</tr>
</table>
`;
let paypalMessage = `
<p>Your order Id is ${orderId}。Please<a href="https://www.paypal.com/cgi-bin/webscr?cmd=_xclick&no_shipping=1&tax=0&amount=${total}&[email protected]¤cy_code=USD¬ify_url=https://mycompany.org/pp.php&item_name=${products.join(',')}&item_number=${orderId}">click here</a>to pay with Paypal.</p>
`;
return header + paypalMessage;
}
Upvotes: 1
Views: 1150
Reputation: 5214
There are a great many indicators that email providers use. A PayPal link can be suspicious because, well, it's asking for money!
The majority of spammers are lazy and have simple emails. I suggest padding out your email with a large footer, unsubscribe details (even if it's transactional) including the word 'unsubscribe', an address, a logo, and other verifying details such as business number.
There is no golden ticket that will get you through, unfortunately!
That's content.
Regarding the mail server:
If you've configured your server with SPF, DKIM, DMARC - and are enforcing DMARC compliance - then that is a very good start, but still doesn't ensure it will get through 100%. The server may need a warming up phase, and also the email provider will look at what rate your customers are opening and interacting with your email. You can try services like Postmark to ascertain whether it is a server issue instead of content.
Upvotes: 1