Page 1 of 2

smtp example please

Posted: Sat Apr 21, 2007 3:00 am
by spamyboy

Code: Select all

while($row = mysql_fetch_array($result)){
if(mail("spamyboy@gmail.com", $subject, $message)) { echo"Ok!</ br>";} else {echo"No...</ br>";}
sleep(1);
}
Could some one give me as SHORTes as possible same mail function example with SMTP protocol.

Posted: Sat Apr 21, 2007 6:15 am
by aaronhall
Swift Mailer has a nice interface.. just include a couple files and call a couple methods.

Posted: Sat Apr 21, 2007 6:16 am
by spamyboy
I didn't request that, I need simple code wothout any other includes.
Pleas anyone.

Posted: Sat Apr 21, 2007 9:09 am
by Chris Corbyn
You cannot make mail() use SMTP if it's using sendmail. I have no idea what you are asking really. mail() is just as basic as it look in the manual ;)

Posted: Sat Apr 21, 2007 9:14 am
by Jumba
I don't know what you mean with example to send mail with smtp precisely, but maybe this will help.
http://email.about.com/od/emailprogramm ... 073006.htm

Posted: Sat Apr 21, 2007 9:37 am
by spamyboy
This one uses PEAR.

Posted: Sat Apr 21, 2007 10:00 am
by Jumba
spamyboy wrote:This one uses PEAR.
\

oh, then I don't know.
Try checking the comments on http://us2.php.net/mail and see if there's any examples there.

Posted: Sat Apr 21, 2007 10:14 am
by bert4
This one has just one include:

http://www.phpclasses.org/browse/package/346.html

Or search:

http://www.google.com/search?hl=en&q=PHP+SMTP+Class


If you need to connect to gmail however, you will need http://www.swiftmailer.org/

Posted: Sat Apr 21, 2007 10:17 am
by neel_basu
are you trying to see the compleate conversation with SMTP Server ??

Posted: Sat Apr 21, 2007 10:18 am
by spamyboy
exactly

Posted: Sat Apr 21, 2007 10:28 am
by neel_basu
OK you Can See the compleate Conversation over here.
but you have to use a class that will show you that.
Go here and download the Class
http://zigmoyd.sourceforge.net/man/mail.php#mail
Please Read This Page for Installation and Instruction on how to use it.
http://zigmoyd.sourceforge.net/man/index.php
And While using it Just Do this Simple Hack / Patch :twisted:

Code: Select all

$mail = new mail("admin@localhost", "Mail Body");
$mail->show_cnv = true;//Show Conversation//Not written in the manual
It will Show the Compleate Conversation Like Cliant Chattion with SMTP server.
I hope this will help you to See the compleate Conversation

Posted: Sat Apr 21, 2007 10:56 am
by spamyboy
Thank you so mutch.

Posted: Sat Apr 21, 2007 11:03 am
by nickvd
So how is that different than using Swiftmail, which is the leading php based mailer?

Posted: Sat Apr 21, 2007 11:03 am
by neel_basu
But 1 question why your ID is spamyboy why its spam. and what does the name mean ??

Posted: Sat Apr 21, 2007 11:21 am
by spamyboy
spamyboy = trash boy;
four years ago I started with: userphp, one day I was totaly <span style='color:blue' title='I'm naughty, are you naughty?'>smurf</span> of spam & don't remember why bu I named me self spamy, ~3 yr ago it changed to spamyboy, also don't know why.