Page 1 of 1

is there a way to find out if the email is valid?

Posted: Fri Mar 07, 2008 4:49 pm
by yacahuma
Hello,


is there a way to find out if the email address I just sent a message is valid that is 100% reliable?


When I use an email client and I send and email to an invalid address I get a reply saying that the email does not exits.

Is the answer having a process that read and specific email account and checking for this errors??


Thank you

Re: is there a way to find out if the email is valid?

Posted: Fri Mar 07, 2008 7:25 pm
by Chris Corbyn
yacahuma wrote:Is the answer having a process that read and specific email account and checking for this errors??
Yes, you can use $message->setReturnPath($address) if you need to specify a different place for bounces to go.

Re: is there a way to find out if the email is valid?

Posted: Fri Mar 07, 2008 9:41 pm
by yacahuma
great,

Can I read a pop server from swift?

Re: is there a way to find out if the email is valid?

Posted: Fri Mar 07, 2008 10:55 pm
by Chris Corbyn
Swift doesn't read emails, it only sends them. Take a look at the IMAP functions in the PHP manual:

http://php.net/imap

Re: is there a way to find out if the email is valid?

Posted: Sat Mar 08, 2008 5:25 am
by yacahuma
I found this link

http://www.weberdev.com/get_example-4015.html


It is amazing how complicated it is.

Some one should develop an odbc interface to mail.

Re: is there a way to find out if the email is valid?

Posted: Sat Mar 08, 2008 5:34 am
by Chris Corbyn
yacahuma wrote:Some one should develop an odbc interface to mail.
:) Take a look at Dovecot for flexible IMAP/POP access to mail on the server. Exim also is highly "pluggable" when it comes to storage of incoming mail. I've written MySQL transports for Exim in a previous job, then provided the web interface for reading that mail.

Re: is there a way to find out if the email is valid?

Posted: Sat Mar 08, 2008 9:24 am
by yacahuma
Could reading functionality be added to swift?

It will be nice to be able to do something like this:

$smtp = new Connection()
foreach ($smtp->GetMail()) as $message)
{
//message is an object with all the info
}

or

foreach($smtp->GetAllHeaders() as $headers)
{
}

Re: is there a way to find out if the email is valid?

Posted: Sat Mar 08, 2008 5:41 pm
by Chris Corbyn
It won't be added to Swift no. It's a bit like asking for FTP functionality to be added to a HTTP library ;) IMAP and SMTP are nothing like each other.

I do have plans to write a separate library for IMAP/POP but it's been on my TODO list for over a year now so as to whether it will ever happen I don't know :)

Re: is there a way to find out if the email is valid?

Posted: Mon Mar 10, 2008 4:39 pm
by gmorehoudh
It'd be nice, because the included PHP IMAP functions are incomplete and glacially slow.

Re: is there a way to find out if the email is valid?

Posted: Mon Mar 10, 2008 9:15 pm
by Chris Corbyn
gmorehoudh wrote:It'd be nice, because the included PHP IMAP functions are incomplete and glacially slow.
Yep, and the interface for them sucks. I'm planning on writing one in the same modular style as Swift. It'd be a far bigger library however since IMAP is a huge protocol.