This question already has answers here:
How do you make sure email you send programmatically is not automatically marked as spam?
(24 answers)
Closed 5 years ago.
I am trying to send a google login link in email body, but it always marks as spam.
The reason which i've found only is accounts.google.com, even though the 'google.com' also not. When i put account. in start of this; it goes to spam otherwise everything works perfect.
See the link and email body below.
$google_link='accounts.google.com/o/oauth2/auth?response_type=code&redirect_uri='.$site_url.'&client_id='.$client_id.'&scope=email+profile&access_type=online&approval_prompt=auto';
$html.='<div>
Click here
</div>
';
wp_mail( $email_address,subject, $html, $headers);
Question: Is there any way to encrypt this URL in email body to send and it works proper in email/gmail inbox?
Is there any other way to avoid the email going to spam like marking specific email by it's subject using any third party mail sending tool?
You can use the third party service SendGrid by registering and installing their WordPress plugin. SendGrid process your email text and replace links with links to SendGrid such that the accounts.google.com will not appear in the email. Upon a user clicking the link, SendGrid will record the click and redirect to your original URL.
Alternatively you could create your own redirect URL. The most secure method would be to have a table to store the URLs and generate a unique token such that you could put your own link in the emails along with the token. When your script is hit, pull the target URL from the table that matches the token and redirect to it.
Related
This is about the new unsubscribe feature implemented in the email header that supports 'One-Click' unsubscribe. This feature is supported by many email clients like email reading apps on smartphones. Other questions like How to add one-click unsubscribe functionality to email newletters? have been asked and answered over ten years ago and have nothing to do with the new feature.
The List-Unsubscribe feature supports two methods (maybe a third for POST, I'm not sure), one method is for sending an email, like a mailto, with the details needed to accomplish an unsubscribe, the other method is via a URL. My question is about the List-Unsubscribe via URL. I have no problem getting the email reader to display (above the email) the unsubscribe button/link with either the email (mailto) or URL (or both) in the email meta header. (I create the email with Python, but this is NOT a Python question). For reference please see RFC 8058 and RFC 2369. What is not clear to me is:
How should the web server respond to the unsubscribe request? I am expecting that the user should not have to take any action beyond clicking on the email client unsubscribe button. Should the webserver just respond with a blank page to the email client, or should it respond with some code? Is there an option for the email client to display a success page. (Is it an option to have the email client display a page? {I don't need this feature but someone might})
RFC2369
[RFC 8058][3]
[3]: https://www.rfc-editor.org/rfc/rfc8058![iPhone email 'Mail' app feature to unsubscribe](https://i.stack.imgur.com/EXteb.jpg)
This question already has answers here:
How do you make sure email you send programmatically is not automatically marked as spam?
(24 answers)
Closed 7 years ago.
I attached an auto email sender with the file name sendemail.inc.php to be sending auto welcome once registered but it lands on spam. Is there any advise that can help?
It would be easier for us to understand why your email goes to spam, if you could attach your code with your question.
There could be several reasons your email can land at spam at the receiver's end.
Check whether your server's IP is blacklisted. Email from a blacklisted IP address will reach the spam folder.
Check whether your domain's MX record is fine.
Check whether your reverse MX A Records (PTR) points to your hostname or IP address
Check if your email content contains too much hyperlinks
Check if your email content contains abusive, marketing words
Check if your email content contains spam trigger words (e.g. Congratulations, won, $)
Try keeping your email in text format, rather than HTML format. It helps your email score. Otherwise include a text version of your email if you are sending HTML emails
Maintain a good text-to-image ratio
Avoid large attachments. If you really need to send large attachments, use something like Dropbox, Google Drive etc to send your file as a link.
Check if your email headers are properly set. If not, use something like PhpMailer. It is a free PHP script, and does it's job pretty good.
Hope this helps.
Use transitional doctype in html emailer.
we define doctype for html while create page. the html emailer needs the same
e.g.
I'm constructing HTML emails in PHP with Zend_Mail and I'd like to embed/attach/whatever some images in such a way that Gmail will automatically display them without prompting the user. How can I do this?
Google's Bulk Sender Guidelines say that Gmail will automatically show images for senders who have authenticated their domain:
To ensure that Gmail can identify you:
Use a consistent IP address to send bulk mail.
Keep valid reverse DNS records for the IP address(es) from which you send mail, pointing to your domain.
Use the same address in the 'From:' header on every bulk mail you send.
We also recommend publishing an SPF record, and signing with DKIM or
DomainKeys.
By authenticating, inline images you send will be shown automatically. Recipients will not need to click the "Display images
below" link.
Google offers a page to learn more about email authentication.
You can't without the user approving your imagery. It's an anti-spam/ anti-tracking technique that has to be off by default to work.
You can make Gmail display images (embedded into content) with authenticating emails sent.
You just make sure you have a correct SPF record, and 1024 bit DKIM signed the message.
Then gmail shows embedded images within content.
As of my knowledge, This is not possible. Gmaill will hide the images initially. If the Use enables (by clicking "Always display images from XXXXXX website"), then it will be available from next time onwards
You can always show images if you use Base 64. That way images are embedded as code in the code and aren't coming from anyone else's server, so there is no tracking risk. Just google how to embed an image as Base 64 and that will solve your issue completely.
I am using the imap_xxxx functions to read the emails body. My problem is to find out only the current portion of the email body not the complete email. When user reply for an email it not only contains the his response but the complete mail chain. I know that facebook does it (or may be many other sites also) but how...
This question already has answers here:
Closed 11 years ago.
Possible Duplicate:
how to make a php script that read an email from the server?
So I want an app to send the user an email, and the user has to respond. How do I capture what the user sent back to the email?
Check the In-Reply-To header of the reply to find out which message it relates to.
There are two possibilities:
Set up a regular off-the-shelf email server, and something to parse the inbox.
Set up a special php email server that listens on port 22 and processes the incoming mail - something like james but php-based. If nothing available you'll have to roll your own.
You have to create some cron job that will retrieve inbox of your email account.
I have implemented simmilar thing but I was using tokens system too - email that was send to user had a random generated token in topic. When user replied I was looking for that token and then associate it with some 'thread' (helpdesk system).