Mail Function

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
User avatar
softsolvers
Forum Commoner
Posts: 75
Joined: Fri Feb 13, 2004 4:26 am
Location: India

Mail Function

Post by softsolvers »

Hi friends,
I have some question regarding mail function,
1.What should be in SMTP server?.The name of Mail Server i think if i donot have such server then what should i write in this .
2.If i am giving the mail server name as the mail server we are using i stick with the mails which passed to this server.Quite Complex.????????
Well i mean
if in mail function ;
mail|("a@yahoo.com","Test","TEsting");
and in php.ini file sendmail_from="B.rediffmail.com";
and what should i write in the SMTP server so that mail could reach there.
Looking for Quick Repply
User avatar
Buddha443556
Forum Regular
Posts: 873
Joined: Fri Mar 19, 2004 1:51 pm

Re: Mail Function

Post by Buddha443556 »

softsolvers wrote:Hi friends,
I have some question regarding mail function,
1.What should be in SMTP server?.The name of Mail Server i think if i donot have such server then what should i write in this .
The name of your outgoing mail server. Check your email settings. However, ten to one your your outgoing mail server uses authentication, so what you need is to find a SMTP class like this one (there are others just look around):

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

or write or own. I modified that above one to mimic the mail function and added a simple switch to choose between AUTH and non-AUTH ( PHP mail() ).
softsolvers wrote:2.If i am giving the mail server name as the mail server we are using i stick with the mails which passed to this server.Quite Complex.????????
Well i mean
if in mail function ;
mail|("a@yahoo.com","Test","TEsting");
and in php.ini file sendmail_from="B.rediffmail.com";
and what should i write in the SMTP server so that mail could reach there.
Looking for Quick Repply
Hmmm....Think I answered that above?
User avatar
Buddha443556
Forum Regular
Posts: 873
Joined: Fri Mar 19, 2004 1:51 pm

Post by Buddha443556 »

Just re-read your post again. If you don't have a mail server (?) then you could send email directly using a SMTP class like the one I mentioned.
User avatar
softsolvers
Forum Commoner
Posts: 75
Joined: Fri Feb 13, 2004 4:26 am
Location: India

Post by softsolvers »

Hello friends,
If i want to send a mail from my yahoo account then which server i need to set
User avatar
Buddha443556
Forum Regular
Posts: 873
Joined: Fri Mar 19, 2004 1:51 pm

Post by Buddha443556 »

You would have to check with Yahoo for your email settings. However, it will not work with the FREE Yahoo account because it doesn't have POP3 access. Plus you will still need a mail class like the one mentioned earlier, but I doubt the one I mentioned as an example will work. You'll need one to verify via POP3 before you can send mail via SMTP. (This is based on two year old info, haven't used yahoo since they discontinued POP3 access.)
User avatar
softsolvers
Forum Commoner
Posts: 75
Joined: Fri Feb 13, 2004 4:26 am
Location: India

Post by softsolvers »

Hello and thanks,
what i feel i am not able to post my question properly,
So again i am writing ,my query-----
I am not a professional user,i want to make a program that the mail will be send from my particular ID like xxx@xxx.com from my pc to all the members i like to send mail.Now which mail server i shoul use.
I hope now you are getting what the actually the problem is?
coreycollins
Forum Commoner
Posts: 67
Joined: Sun Feb 01, 2004 1:04 pm
Location: Michigan

Post by coreycollins »

You need to set up a web server or figure out your ISP's web server. If the php code is on your box and you are running win 2k, xp, or 2003 you can set up a smtp server with IIS.
User avatar
softsolvers
Forum Commoner
Posts: 75
Joined: Fri Feb 13, 2004 4:26 am
Location: India

Post by softsolvers »

Thanks ,
but will u explain this further.
User avatar
softsolvers
Forum Commoner
Posts: 75
Joined: Fri Feb 13, 2004 4:26 am
Location: India

Mail Problem

Post by softsolvers »

Hello friends,
i had made the changes in the php.ine file of my system,but still i am not able to get the mail at my free site id.
i am writing the code,
<?php
mail("abc@xxx.xxx","test","test");
?>
in php.ini file i had made 2 changes in php.ini .
1.SMTP =mail.abc.com
(my SMTP server)
2.sendmail_from= shah_divyesh@lycos.com
but i am not getting the mail at abc#xxx.xxx,why is it so.
Please do help me?????????????
Post Reply