problem with 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
orninyo
Forum Newbie
Posts: 10
Joined: Fri Oct 24, 2008 4:46 am

problem with mail() function

Post by orninyo »

hi
im using mail() function this way:

Code: Select all

echo mail('mymail@gmail.com','some string','some string');
i set my php.ini this way:

Code: Select all

 
[mail function]
; For Win32 only.
SMTP =mailgw.netvision.net.il 
smtp_port = 25
 
; For Win32 only.
;sendmail_from = mymail@gmail.com
my php file is on locallhost from my pc.
i alert the return msg from mail() and u can see it in the image attach to the post.

what is the problem?

thx in advance.
Attachments
1.jpg
1.jpg (12.67 KiB) Viewed 186 times
orninyo
Forum Newbie
Posts: 10
Joined: Fri Oct 24, 2008 4:46 am

Re: problem with mail() function

Post by orninyo »

bamp :|
User avatar
omniuni
Forum Regular
Posts: 738
Joined: Tue Jul 15, 2008 10:50 pm
Location: Carolina, USA

Re: problem with mail() function

Post by omniuni »

I suspect that it's just because it's on localhost, if you're using mail() correctly. Try signing up for an account at yakkel.com or another free host, and try your script there.
orninyo
Forum Newbie
Posts: 10
Joined: Fri Oct 24, 2008 4:46 am

Re: problem with mail() function

Post by orninyo »

it asking for authentication
how do i add to mail() the password and username parameters for the smtp server?

and is the pass and the user name of my internet supplier is the same as the internet connection pass and username?
orninyo
Forum Newbie
Posts: 10
Joined: Fri Oct 24, 2008 4:46 am

Re: problem with mail() function

Post by orninyo »

bump :(
Post Reply