943,724 Members | Top Members by Rank

Ad:
  • PHP Discussion Thread
  • Unsolved
  • Views: 1165
  • PHP RSS
Nov 7th, 2008
0

Semi-automated email script

Expand Post »
I'm making a site for a guy, and he needs a way to email all his customers with a single form to save time and be more efficient. I got the compose page done. But in the past, from my experience, when I sent myself emails generated from sendmail, some email services didn't accept them. They were blocked, didn't even make it to bulk or junk mail folders. This was more than likely because I used a bogus email from address. He has a host account registered, with email addresses to use for the site. But how would I integrate those into a PHP script? Wouldn't I still have to hard code an email address into the sendmail form? How would it know it's real, and not bogus?

I am going to put this into a loop, so that for each customer record that is queried in sequence, an email is sent to their email address. Pretty straightforward.

Thanks in advance.
Reputation Points: 50
Solved Threads: 0
Junior Poster in Training
Diode is offline Offline
70 posts
since Jan 2005
Nov 7th, 2008
0

Re: Semi-automated email script

I use the class.phpmailer.php. It will add all the headers for you and will work for both plain text and html email. It works for hotmail, yahoo, gmail, and many others.
Reputation Points: 232
Solved Threads: 137
Practically a Master Poster
buddylee17 is offline Offline
665 posts
since Nov 2007
Nov 11th, 2008
0

Re: Semi-automated email script

Click to Expand / Collapse  Quote originally posted by Diode ...
I'm making a site for a guy, and he needs a way to email all his customers with a single form to save time and be more efficient. I got the compose page done. But in the past, from my experience, when I sent myself emails generated from sendmail, some email services didn't accept them. They were blocked, didn't even make it to bulk or junk mail folders. This was more than likely because I used a bogus email from address. He has a host account registered, with email addresses to use for the site. But how would I integrate those into a PHP script? Wouldn't I still have to hard code an email address into the sendmail form? How would it know it's real, and not bogus?

I am going to put this into a loop, so that for each customer record that is queried in sequence, an email is sent to their email address. Pretty straightforward.

Thanks in advance.
What function are you using to send email.
You will have to hardcode the sender email address into that function since like you said, you need a valid sender email.
Some Mail Transfer Agents (MTAs) will try to validate sender email before accepting email or callback later for verification. Basically, if you have a valid sender email, then MTA responsible for that address will take care of any validation needed by the remote MTA for which the email is being delivered.
Moderator
Reputation Points: 457
Solved Threads: 101
Nearly a Posting Virtuoso
digital-ether is offline Offline
1,250 posts
since Sep 2005
Nov 11th, 2008
0

Re: Semi-automated email script

What function are you using to send email.
You will have to hardcode the sender email address into that function since like you said, you need a valid sender email.
Some Mail Transfer Agents (MTAs) will try to validate sender email before accepting email or callback later for verification. Basically, if you have a valid sender email, then MTA responsible for that address will take care of any validation needed by the remote MTA for which the email is being delivered.
Thanks. I was going to use mail().
Reputation Points: 50
Solved Threads: 0
Junior Poster in Training
Diode is offline Offline
70 posts
since Jan 2005
Nov 11th, 2008
0

Re: Semi-automated email script

It will go in spam box for sure.
Reputation Points: 769
Solved Threads: 128
Banned
ithelp is offline Offline
1,910 posts
since May 2006

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in PHP Forum Timeline: problem with count and displaying result
Next Thread in PHP Forum Timeline: How install APC(Alternative PHP Cache) in window





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC