472,125 Members | 1,496 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,125 software developers and data experts.

how to send mail in php and check whether ir rebound or not

hi

i am building aan application which will send mail to user when he
registers on my site and i am checking whther the email id is working
properly or not by sending his email and then cheking whether the email
was rebound or not.

i know something about how to send email in php using mail function but
not everything about sending email.

i don't know anything about how can i check whether the email rebound
or not. also tell me about sending email using php what considerations
should be kept in mind when sending email.

pls help me

thxs for your help in advance.

Jul 17 '05 #1
6 4633
I noticed that Message-ID:
<11**********************@z14g2000cwz.googlegroups .com> from vishal
contained the following:
i am building aan application which will send mail to user when he
registers on my site and i am checking whther the email id is working
properly or not by sending his email and then cheking whether the email
was rebound or not.


Invalid addresses won't always bounce. me@privacy.net for instance will
simply drop into a bit bucket.

The only way you can check if an email address is valid, and, more
importantly being read, is to elicit a response from a real person.
This can be in the form of a unique link in the email which matches a
database entry. When the user responds, a flag in the database is set
to validated.

--
Geoff Berrow (put thecat out to email)
It's only Usenet, no one dies.
My opinions, not the committee's, mine.
Simple RFDs http://www.ckdog.co.uk/rfdmaker/
Jul 17 '05 #2
*** vishal escribió/wrote (19 Mar 2005 00:03:45 -0800):
i don't know anything about how can i check whether the email rebound
or not. also tell me about sending email using php what considerations
should be kept in mind when sending email.


First of all, mail() will return FALSE if mail is not accepted by the mail
server or sendmail executable. If accepted, you can only know whether it
was returned checking the "return-path" e-mail address. Under Linux/Unix
you can normally specify it in mail():

mail($to, $subject, $body, "From: $from", "-f$returnpath");

You can use IMAP or POP3 functions to check this mailbox or configure it to
deliver mail to a program, but I suppose in your case it's enough with
checking it manually.

I hope this helps.

--
-+ Álvaro G. Vicario - Burgos, Spain
+- http://www.demogracia.com (la web de humor barnizada para la intemperie)
++ No envíes tu dudas a mi correo, publícalas en el grupo
-+ Do not send me your questions, post them to the group
--
Jul 17 '05 #3
Following on from vishal's message. . .
hi

i am building aan application which will send mail to user when he
registers on my site and i am checking whther the email id is working
properly or not by sending his email and then cheking whether the email
was rebound or not.


What are you /really/ trying to test?

All a rebound test tells you is that if in future you send mail to that
address it probably won't bounce back. But what good is that when
/presumably/ you want to ensure there is a real person or intelligent
agent on the other end?

The usual way to handle this is to send an email with some key to
completing the registration process. (Unique,random for each attempt).
Or just email them their userid+(system generated) password.
Or just email them their password and give them the user id on the web
page.

If you're trying to do some input validation (where A supplies an email
for B which is supposed to be valid but may have syntax mistakes) then
look up the many scripts.
In short - Bad idea.
--
PETER FOX Not the same since the bottom fell out of the bucket business
pe******@eminent.demon.co.uk.not.this.bit.no.html
2 Tees Close, Witham, Essex.
Gravity beer in Essex <http://www.eminent.demon.co.uk>
Jul 17 '05 #4
"vishal" <vi************@yahoo.co.in> wrote in message
news:11**********************@z14g2000cwz.googlegr oups.com...
hi

i am building aan application which will send mail to user when he
registers on my site and i am checking whther the email id is working
properly or not by sending his email and then cheking whether the email
was rebound or not.

i know something about how to send email in php using mail function but
not everything about sending email.

i don't know anything about how can i check whether the email rebound
or not. also tell me about sending email using php what considerations
should be kept in mind when sending email.

pls help me

thxs for your help in advance.


I have in the past used HTML e-mail to check whether a message is actually
read or not. What you do is put something like <img
src="http://www.mysite.com/webbug.php?id=32434" height="1" width="1"> in the
message somewhere. When the mail program opens it, the PHP script would be
triggered.

Not a technique that works reliably though.
Jul 17 '05 #5
Chung Leong (ch***********@hotmail.com) wrote:
: "vishal" <vi************@yahoo.co.in> wrote in message
: news:11**********************@z14g2000cwz.googlegr oups.com...
: > hi
: >
: > i am building aan application which will send mail to user when he
: > registers on my site and i am checking whther the email id is working
: > properly or not by sending his email and then cheking whether the email
: > was rebound or not.
: >
: > i know something about how to send email in php using mail function but
: > not everything about sending email.
: >
: > i don't know anything about how can i check whether the email rebound
: > or not. also tell me about sending email using php what considerations
: > should be kept in mind when sending email.
: >
: > pls help me
: >
: > thxs for your help in advance.

: I have in the past used HTML e-mail to check whether a message is actually
: read or not. What you do is put something like <img
: src="http://www.mysite.com/webbug.php?id=32434" height="1" width="1"> in the
: message somewhere. When the mail program opens it, the PHP script would be
: triggered.

: Not a technique that works reliably though.

and in fact is a spam trigger so that the mail may never be seen at all
because of it.
--

This space not for rent.
Jul 17 '05 #6
"vishal" <vi************@yahoo.co.in> wrote in message
news:11**********************@z14g2000cwz.googlegr oups.com...
hi

i am building aan application which will send mail to user when he
registers on my site and i am checking whther the email id is working
properly or not by sending his email and then cheking whether the email
was rebound or not.

i know something about how to send email in php using mail function but
not everything about sending email.

i don't know anything about how can i check whether the email rebound
or not. also tell me about sending email using php what considerations
should be kept in mind when sending email.

pls help me

thxs for your help in advance.


If you wanted to know right then and there if it were accepted, you would
need to either:

1. Find a binary that will take your message and connect to the
destination's SMTP server, send the message, and exit. If it has output you
can access you could look for a error response from the SMTP server, looking
for a 500 (if I remember correctly) error code. Sendmail MIGHT have
something like this -- but I'm sure there is something out there.

2. Write #1 yourself. SMTP isn't that complicated, as long as you don't
need an attachment. If you were to need an attachment, there are plenty of
examples of mime encoding w/ PHP out there. Anyway, it could be done.

That's what I would do if I wanted to know if the email went through.

-Joe
Jul 17 '05 #7

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

1 post views Thread by Dhruv | last post: by
reply views Thread by David Burson | last post: by
2 posts views Thread by Leszek | last post: by
5 posts views Thread by Andreas | last post: by
3 posts views Thread by Max | last post: by
14 posts views Thread by Professor Yonce | last post: by
reply views Thread by leo001 | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.