Welcome Guest ( Log In | Register )



 
Reply to this topicStart new topic
> Php Send Mail Through Smtp
haitamlong
post Oct 4 2006, 10:24 AM
Post #1


Newbie [ Level 1 ]
Group Icon

Group: Members
Posts: 4
Joined: 4-October 06
Member No.: 16,341



Can anyone here tell me how to send mail through SMTP server with php mellow.gif I have search in many source code on web and cant find anything sad.gif
Go to the top of the page
 
+Quote Post
Houdini
post Oct 4 2006, 11:42 PM
Post #2


Super Member
Group Icon

Group: Members
Posts: 572
Joined: 25-April 05
From: Nashville Tennessee
Member No.: 4,340



What you are probably really wanting to use is the mail() function which is used pretty widely with PHP.

I personally use this function on my local PC which is connectted persistently through a DSL connection (256k download and 126 upload tested) my test scripts run as long as they are coded properly and so I test them to my own e-mail address to check for errors or to make improvements to them.

If you are simply wanting to use PHP to send e-mail then just click the link above that I provided and if you have any difficulties sending to your own email then you could post again with those problems with any errors encountered or anomolies with your script and I will be glad to help you with it. You could also PM me about the problems real or imagened. Welcome to the world of PHP here on Astahost.

This post has been edited by Houdini: Oct 4 2006, 11:43 PM
Go to the top of the page
 
+Quote Post
mastercomputers
post Oct 5 2006, 01:21 AM
Post #3


PESTICIDAL MANIAC
Group Icon

Group: Members
Posts: 626
Joined: 1-September 04
From: Auckland, New Zealand
Member No.: 27



If you're searching for a way to send via SMTP, then I guess you don't mean the mail() function as you would find tonnes of information on that.

There's an alternative way, using PHP and sockets to connect to the SMTP server and send the commands that are requested by the SMTP server, the problem however is that most SMTP servers are set up to not allow RELAYing of messages from outside without SMTP authentification that you are actually an allowed user to use that SMTP server, reason being many SPAM mailers could use these servers to distribute their mail if they were not secured against it.

If you want to find ideas, look for SMTP via Telnet methods, and then learn PHP sockets to do the exact same thing, as the method is just the same, except you're using PHP to do what you would do in Telnet.

You will probably also need to read the RFC on SMTP so you can understand how verification and authentification is done, as well as limitations on it.

Cheers,

MC
Go to the top of the page
 
+Quote Post
Hercco
post Oct 8 2006, 04:51 PM
Post #4


Super Member
Group Icon

Group: Members
Posts: 595
Joined: 4-September 04
Member No.: 228



Yep, you basically could build an SMTP client with PHP. It's actually quite easy if you understand protocols in general and have some experience in socket programming.

What I suggest is that you read RFC821 (for example here: http://www.ietf.org/rfc/rfc0821.txt) and then take a look at PHP manual for sockets. If you want example code, you'll be able to find tons at least in C language.

I remember reading about an open source project for a PHP class containing bunch of emailing functionalities including smtp. Unfortunately I wasn't able to find anything on it right now. And I do believe PEAR package has some sort of SMPT implementation.
Go to the top of the page
 
+Quote Post
Sherif G.s
post Feb 10 2007, 05:35 PM
Post #5


Newbie [ Level 2 ]
Group Icon

Group: Members
Posts: 17
Joined: 10-February 07
Member No.: 20,325



QUOTE(Hercco @ Oct 8 2006, 04:51 PM) *

Yep, you basically could build an SMTP client with PHP. It's actually quite easy if you understand protocols in general and have some experience in socket programming.

What I suggest is that you read RFC821 (for example here: http://www.ietf.org/rfc/rfc0821.txt) and then take a look at PHP manual for sockets. If you want example code, you'll be able to find tons at least in C language.

I remember reading about an open source project for a PHP class containing bunch of emailing functionalities including smtp. Unfortunately I wasn't able to find anything on it right now. And I do believe PEAR package has some sort of SMPT implementation.


this site dunt work'n bro
if ya have anysite be da same plz post it
thx
Go to the top of the page
 
+Quote Post
WeaponX
post Feb 11 2007, 01:09 AM
Post #6


Way Out Of Control - You need a life :)
Group Icon

Group: Members
Posts: 1,086
Joined: 21-June 05
From: New York
Member No.: 6,440
myCENTs:86.41



The site does work. It's just that the forum has included the right parenthesis. This is by design. So just take away the right parenthesis...

http://www.ietf.org/rfc/rfc0821.txt
Go to the top of the page
 
+Quote Post
iGuest
post Sep 26 2007, 01:52 PM
Post #7


Newbie [ Level 1 ]
Group Icon

Group: Members
Posts: 0
Joined: 1-November 07
Member No.: 25,869



Get phpMailer .It's a nice class for sending email using smtp.
hope it helps

-James Mutuku
Go to the top of the page
 
+Quote Post
iGuest
post Aug 4 2008, 10:04 PM
Post #8


Newbie [ Level 1 ]
Group Icon

Group: Members
Posts: 0
Joined: 1-November 07
Member No.: 25,869



How to send mail using gmail as a smtp server
Php Send Mail Through Smtp

Hi
I tired a lot of scripts to send mail throug smtp and no one of them was working correctly.
One of them sends mail to spam because there were no authentication.
One of them worked cool but after sending 30-40 mail gave me an error
Error: Language string failed to load: connect_host
now I'm mixed up and really need a mail sender that it really work
Thanks a lot
Masoudmpour@yahoo.Com

-reply by Bardiya
Go to the top of the page
 
+Quote Post
turbopowerdmaxst...
post Aug 6 2008, 05:15 PM
Post #9


Premium Member
Group Icon

Group: [HOSTED]
Posts: 410
Joined: 16-February 06
From: Kolkata, India
Member No.: 11,322
myCENTs:82.69



I have been using phpMailer for quite sometime. However, for some reason, it is unable to send mail anymore. I don't recall changing any of the configurations either. I was using gmail as the SMTP server. But now, I have switched back to the mail function, which always works.
Go to the top of the page
 
+Quote Post

Reply to this topicStart new topic

Collapse

> Similar Topics

Topics Topics
  1. Form Mail Php - Use Php To Send Form Through Email(8)
  2. Do You Want A Mail Form In Your Site(2)
  3. Simple E-mail Validation(2)
  4. Sending Mail To A Mailing List(12)
  5. Using The Php Mail() Function For Images Or Attachments(6)
  6. E-mail List Error(4)
  7. PHP: Need Help Sending Mail Using SMTP(5)
  8. Using Php With A Mail Server(2)


 



- Lo-Fi Version Time is now: 22nd November 2008 - 04:46 PM