0

i have sendmail set up on Ubuntu 12.10, Apache 2.2 and I can now successfully send emails from my local server using php mail() function. I just wanted to know how do i send mail to my server from gmail or perhaps just send mail to my local server from my local server...

I have tried finding my IP addess and sending a mail from my gmail account to somefakeid@myip and i dont seem to see any mail in /var/mail directory..

and by the way just confirming, any recieved mail will be stored in from of a text file in /var/mail whose name will be the username to which the mail was sent right?

i dont see any file named somefakeid...

Please help...

(Isn't there any PHP inbuilt function which checks for any received mail?)

tenstar
  • 9,816
  • 9
  • 24
  • 45

2 Answers2

1

You can use phpmailer class to connect to a remote or gmail server and than send email.

refer to the following link for more information: http://phpmailer.worxware.com/?pg=examplebgmail

Zain Baloch
  • 410
  • 5
  • 9
0

You need couple of things, you need a domain and a mx record. when you have the domain you point your mx record to point to your IP and make sure port 25 is open to receive email.

DevZer0
  • 13,433
  • 7
  • 27
  • 51