Mailout Questions
Moderator: General Moderators
Mailout Questions
Hi everyone
I'm trying to do a mailout to 8000 email addresses. I wanted to know if their is anyway that php can validate the email addresses to see if they exist before the mail is sent.
also is their away that php can see whether the mail box excepts html messages and if not then a text email is sent out.
can anyone give any other good hints about php and mailouts...i'm a newbie to php.
I'm trying to do a mailout to 8000 email addresses. I wanted to know if their is anyway that php can validate the email addresses to see if they exist before the mail is sent.
also is their away that php can see whether the mail box excepts html messages and if not then a text email is sent out.
can anyone give any other good hints about php and mailouts...i'm a newbie to php.
PHP can't check whether emails really exist - it can only validate them according to specified pattern.
If you google a bit, you'll sure find some nice regular-expression libraries which have an email-validation function.
Unless you have your own mailserver, it's very likely that your hosting company's smtp-server has a floodcheck, meaning you can't send all those 8000 emails out at once.
You are using this for a newsletter - not for unsolicited emails (i.e. spam), right?
If you google a bit, you'll sure find some nice regular-expression libraries which have an email-validation function.
Unless you have your own mailserver, it's very likely that your hosting company's smtp-server has a floodcheck, meaning you can't send all those 8000 emails out at once.
You are using this for a newsletter - not for unsolicited emails (i.e. spam), right?
OK, to check that an email is valid you have to:
- getmxrr() the domain to get a list of mx servers.
- try opening a socket to each mx server on port 25 (SMTP) until one responds
- send the correct SMTP commands to handshake with the server, i.e., EHLO, MAIL FROM... etc.
- Send RCPT TO command to server. If response is 250, then the email is valid.. well it could be a catch-all, but it is at least a mailbox that can accept emails
why is it that asp and coldfusion can do this?
asp upload has features to check this....i would have thought that php would have had some type of feature to check whether the mail account allows html emails.
what if out the 8000 mailouts...only half allow html to be displayed. is their away around this. does php automatically make an attachment file out the html that is sent?
asp upload has features to check this....i would have thought that php would have had some type of feature to check whether the mail account allows html emails.
what if out the 8000 mailouts...only half allow html to be displayed. is their away around this. does php automatically make an attachment file out the html that is sent?
ASP can not only check whether an email-address truly exists on a server but also whether the client accepts HTML- or text-emails?
Unless the user has specified that when subscribing to the newsletter (or whatever it is you're sending out) I find that hard to imagine in any server-side scripting language - as releasedj said, it depends on the email-client.
Unless the user has specified that when subscribing to the newsletter (or whatever it is you're sending out) I find that hard to imagine in any server-side scripting language - as releasedj said, it depends on the email-client.