Reputation: 10506
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?)
Upvotes: 0
Views: 1023
Reputation: 470
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
Upvotes: 1
Reputation: 13525
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.
Upvotes: 0