My friend has got a e-commerce website where users can choose to receive mail with the new offers. So he asked to me to create a system to send them an email.
How can I with php send an email to all the people in the mailing list?
I know that editing the php.ini I can send mail from my personal email, like GMAIL, but it has a maximum number of mails for day.
So what is the right way?
The right way to do this is with SMTP.
http://www.jvfconsulting.com/blog/php-mail-function-vs-smtp-guaranteed-delivery/ explains that the standard php mail function sends mail, but your mails can be heavily blocked by anti-spam mechanisms of ISPs.
There are many prebuilt solutions, PHPMailer being one of them. Please see this link as well: send email using Gmail SMTP server through PHP Mailer
Related
I am building a website with PHP for a client. The website has a contact form, so I added the phpmailer class to be able to send the contact form details to the client's mail address.
Now, when I configure the phpmailer class, I have to provide the SMTP server username and password (I used smtp.gmail.com). I highly doubt that my client will give me his gmail credentials.
When I use the phpmailer class without enabling SMTP configuration (i.e not giving $mail->isSMTP() and the relevant configurations that follows it), I get the message marked as SPAM in my inbox. I can't use the php mail function because I want to format the body of the email as a template with HTML and CSS.
Is there a way I can use the phpmailer class(no SMTP) without getting the email marked as SPAM? or Is there any other solution for the problem I am facing?
Emails sent by phpmailer being marked as SPAM is a much more complex issue. You might find a good explanation:
phpMailer gmail spam
Even the GitHub of PHP Mailer also has this discussion:
https://github.com/PHPMailer/PHPMailer/issues/111
There are also quite a few search results on Google, regarding this topic.
Currently I'm using mailgun to send email, but planing to send email using smtp in zend framework php.
My main concern are:
Need to track the emails against open and click by recipients.
how can we send the emails in batch like for marketing emails or bulk emails?
is there any limit like only x numbers of emails can be sent using one Smtp authenticated configuration?
do we need to have user based SMTP settings to send email from those users or is it possible to have one common SMTP settings base same email domain for all the users to sent email from our application?
Mailgun have functionality for track your messages, more information you can find here. If you want to have your own mail server for sending your emails I don't have idea how to track messages unfortunately
I think best way to send bulk email messages is queue implementation. You can implement own queue or use something ready. Mails should be send by cron job to avoid blocking main connecting thread
Yes, mailgun has limits: Mailgun Pricing Page but if you wan't to send mails by your own server there are no limits.
You can have one account to send emails, it's not a problem
I've a drupal 7 site, and requires a functionality by which I can read emails from gmail inbox whenever they arrives. Currently I'm achieving it with php imap by running it on cron.
But I want something, which can read email from inbox as soon as it arrives.
Please suggest, thanks
This would be a bit of a round-the-houses approach but create an account with mailgun.com. Within Mailgun you can then direct incoming emails to a URL you specify. Mailgun parses the email and sends it to you in a structured format.
You could then set up your Gmail account to send a copy of all incoming emails to your Mailgun account.
I am using Joomla Mailer to send email notifications to users and admin. The issue is the server can only send emails to gmail, outlook and yahoo(those are the only ones i tested). But it cant send to other domains like xxxx#mysite.com.
All the mails are sent to multiple recipients, some recipients have the gmail,hotmail or yahoo mail, others have custom mail eg xxxx#mysite.com or yyy#myothersite.com.
The ones using gmail,yahoo or hotmail can receive the mails, but the ones using custom mails cannot. What might be the issue.
I am sending emails using a genuine email for my site.
I have checked the server PTR records using http://www.intodns.com and everything seems ok.
Any Help?
Are you using a SMTP server to send out the mail? Other hosts might think your headers look spammy. This article goes over setting up email to use SMTP instead of the mail() function.
http://www.inmotionhosting.com/support/edu/joomla-25/how-to/configure-email-over-smtp
I'm using PHPMailer for sending activation codes to users. As far as I know, that's best script for this purpose. Today noticed that, some users doesn't receive activation codes. But mailer return "Succesfully sent" message. Is there any chance that, phpmailer can't send to some mail servers? Or which is the best php script for sending mail via smtp authentification in your opinion?
It's not obvious that it is PHPMailer problem. It has connected to your smtp server and successfully sent the message. By successfully I mean that your server has accepted it. What happens next is a mystery and you have no control over it.
Few common reasons of undelivered mail:
marked as SPAM by foreign server (advise users to check their spam folder)
target mailbox does not exist (typos in username etc)
user inbox is full and will not accept new mail
mail queue on the server is quite big and it will take few minutes / hours to deliver
The best you can do is to advise users to keep their mailboxes clean, check their spam folder, retype email to prevent typos and offer a service for re-sending the activation email.
I send registration and activation emails using SwiftMailer via Google Apps Mail (support#mydomain.com). It works like a charm, easy to setup, and has no delivery issues since it's using Google's servers. Check it out.