Welcome Guest, Not a member yet? Register   Sign In
send email from local mail server to my gmail account
#1

[eluser]eranbe[/eluser]
hi all
I saw many guides about hoe to configure mail server but none helped me with this problem.

Maybe I do not understand how it should work but when I send email from codeigniter, I see that the sending succeeded, My mail server (called "Test Mail Server Tool") open the mail with outlook...
but what missing for me is the mail getting to my gmail (this is my "to" parameter).

Please let me know if it's possible to send email from local server with a made up domain to gmail.
If yes, what am I missing?

Thanks
#2

[eluser]keld[/eluser]
You can send email from localhost to your gmail, this is that I use on my website:

Code:
$config['protocol']='smtp';
$config['smtp_host']='ssl://smtp.googlemail.com';
$config['smtp_port']=465;
$config['smtp_user']='[email protected]';
$config['smtp_pass']='yourgmailpassword';
$config['charset']='utf-8';
$config['mailtype']='html';
$config['newline']="\r\n";

and you need to edit your php.ini file (it's around the middle of the file):
Code:
[mail function]
; For Win32 only.
; http://php.net/smtp
SMTP = ssl://smtp.googlemail.com
; http://php.net/smtp-port
smtp_port = 25

; For Win32 only.
; http://php.net/sendmail-from
sendmail_from = [email protected]
#3

[eluser]eranbe[/eluser]
Thanks for the reply.
If I understand what you suggest, this configuration will send the mail from my gmail account...

This is not what I wanted.
I want to send the email from codeigniter via a local mail server (this is a link to it: http://www.toolheap.com/)
And I want the mail to be sent to a gmail account.
I'll fill the "To" field and "From" field in the code with $this->email->from() and $this->email->to().

I thought I can fill any email in the "From" field (I don't care if google will send this mail to the spam folder)

Thanks.




Theme © iAndrew 2016 - Forum software by © MyBB