我使用Mailgun發送交易電子郵件(事件票),所有電子郵件都發送到Outlook/Hotmail垃圾郵件,我想避免這種情況。我已經添加了SPF和DKIM記錄,沒有任何工作。我應該怎麼做,以避免垃圾郵件過濾器(實際上,我沒有發送垃圾郵件。當他註冊事件的用戶觸發事務的電子郵件)如何避免垃圾郵件在Outlook/Hotmail與Mailgun?
Client client = Client.create();
client.addFilter (new HTTPBasicAuthFilter ("api", "MI_API_KEY"));
WebResource webResource = client
.resource ("MAILGUN_URL");
MultivaluedMapImpl formData = new MultivaluedMapImpl();
formData.add ("from", "[email protected]");
formData.add ("to", "[email protected]");
formData.add ("subject", "Camilo, welcome to the event");
formData.add ("html", "<h1>Camilo thank you for your registration in the event</h1>"));
formData.add ("text", "Camilo thank you for your registration in the event");
ClientResponse clientResponse = webResource.type (MediaType.APPLICATION_FORM_URLENCODED)
.post (ClientResponse.class, formData);
int status = clientResponse.getStatus();
if (status >= 400)
{
throw new BadRequestException ("Your message couldn't be sent");
}
看起來就像添加取消訂閱鏈接爲我們做的那樣:'Mailgun控制面板>域名>(你的域名)>跟蹤設置>取消訂閱' – Sphinxxx