Jump to content


Photo

how to send emails from localhost with mail()


  • Please log in to reply
9 replies to this topic

#1 karthikeyan_coder

karthikeyan_coder
  • Members
  • PipPipPip
  • Advanced Member
  • 201 posts

Posted 02 July 2006 - 12:04 AM

i've tried to send emails from localhost. but its showing some error like...

Warning: mail() [function.mail]: Failed to connect to mailserver at "192.168.110.30" port 25, verify your "SMTP" and "smtp_port" setting in php.ini or use ini_set() in D:\wamp\www\mailsender.php on line 55


actually in my php.ini file contains...

[mail function]
; For Win32 only.
SMTP = 192.168.110.30
smtp_port = 25

; For Win32 only.
sendmail_from = info@info.com


whats the problem???
im running apache under windowzxp box...


Thank you,
Karthi Keyan.


www.karthi.us

#2 hackerkts

hackerkts
  • Members
  • PipPipPip
  • Advanced Member
  • 593 posts
  • LocationSingapore
  • Age:18

Posted 02 July 2006 - 12:28 AM

You have to make sure you had a working mail server (SMTP).

Regards,
hackerkts

To be a coder, you must learn how to think and not to give up so easily.


#3 karthikeyan_coder

karthikeyan_coder
  • Members
  • PipPipPip
  • Advanced Member
  • 201 posts

Posted 02 July 2006 - 09:46 AM

You have to make sure you had a working mail server (SMTP).


LOL i know its a SMTP mailserver prob... its not working.... i asked how to solve this.... i hope you never read this

Warning: mail() [function.mail]: Failed to connect to mailserver at "192.168.110.30" port 25, verify your "SMTP" and "smtp_port" setting in php.ini or use ini_set() in D:\wamp\www\mailsender.php on line 55


Hackers must have a skill to solve probs... LOL


Any one know? how to slove? Please help me...
www.karthi.us

#4 wildteen88

wildteen88
  • Staff Alumni
  • Advanced Member
  • 10,482 posts
  • LocationUK, Bournemouth

Posted 02 July 2006 - 10:09 AM

Does the SMTP server require authentication in order to send emails. if it does mail doesnt support this.

#5 karthikeyan_coder

karthikeyan_coder
  • Members
  • PipPipPip
  • Advanced Member
  • 201 posts

Posted 02 July 2006 - 10:16 AM

Does the SMTP server require authentication in order to send emails. if it does mail doesnt support this.


it isn't asking for any authentications... :( So my ISP must support SMTP... am i right?
www.karthi.us

#6 hackerkts

hackerkts
  • Members
  • PipPipPip
  • Advanced Member
  • 593 posts
  • LocationSingapore
  • Age:18

Posted 02 July 2006 - 10:17 AM

I saw the warning..
The problem is with the mail server that's why I suggest you to make sure you had it working.  :D

Hmm..
Try changing
SMTP = 192.168.110.30
To
SMTP =  localhost

Btw.. Which mail server you using ?
P.S : hacker is just a nick lolz  ;D

Regards,
hackerkts

To be a coder, you must learn how to think and not to give up so easily.


#7 karthikeyan_coder

karthikeyan_coder
  • Members
  • PipPipPip
  • Advanced Member
  • 201 posts

Posted 02 July 2006 - 10:24 AM

I saw the warning..
The problem is with the mail server that's why I suggest you to make sure you had it working.  :D

Hmm..
Try changing
SMTP = 192.168.110.30
To
SMTP =  localhost

Btw.. Which mail server you using ?
P.S : hacker is just a nick lolz  ;D



[mail function]
; For Win32 only.
SMTP = localhost
smtp_port = 25

; For Win32 only.
sendmail_from = info@info.com

still having problem.....
www.karthi.us

#8 redarrow

redarrow
  • Members
  • PipPipPip
  • Advanced Member
  • 7,308 posts
  • Locationlondon

Posted 02 July 2006 - 10:38 AM

what port is your router set to?

what mail server useing?

router must redirect smtp to mail server ip.

smtp=router ip to the mail server.

smtp_port= router smtp port for the mail server.

send_mail_from=mail server for admin like admin@whatevr.com.
Wish i new all about php DAM i will have to learn
((EMAIL CODE THAT WORKS))
http://simpleforum.ath.cx/mail2.inc
((PAYPAL INTEGRATION THAT WORKS))
http://simpleforum.a...aypal1_info.inc

#9 karthikeyan_coder

karthikeyan_coder
  • Members
  • PipPipPip
  • Advanced Member
  • 201 posts

Posted 02 July 2006 - 10:48 AM

what port is your router set to?

what mail server useing?

router must redirect smtp to mail server ip.

smtp=router ip to the mail server.

smtp_port= router smtp port for the mail server.

send_mail_from=mail server for admin like admin@whatevr.com.


let me collect those informations...

www.karthi.us

#10 redarrow

redarrow
  • Members
  • PipPipPip
  • Advanced Member
  • 7,308 posts
  • Locationlondon

Posted 02 July 2006 - 10:53 AM

i know its all confusing but i do sisco routing from home to business users daily so i no i can help ok
pm the information to me if your worried ok.
Wish i new all about php DAM i will have to learn
((EMAIL CODE THAT WORKS))
http://simpleforum.ath.cx/mail2.inc
((PAYPAL INTEGRATION THAT WORKS))
http://simpleforum.a...aypal1_info.inc




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users