Jump to content

How to send mail using googlemail SMTP server ?


Pesho

Recommended Posts

do you mean using gmails smtp address or you just want to have your gmail email address to appear as sender?

 

you just add extra headers:

 

<?php$to      = '[email protected]';
$subject = 'subject';
$message = 'messagesssss';
$headers = 'From: [email protected]' . "\r\n" .
    'Reply-To: [email protected]' . "\r\n";

mail($to, $subject, $message, $headers);
?> 

i guess you're trying to make your own gmail app? otherwise you wouldn't need your password to be included in that. Can't really see the need to make your own gmail - but whatever floats your boat.

 

I would imagine it's possible sites like www.bebo.com let you sign in to gmail to access your contact book to add them as contacts to your social network.

all right, I guess I don't want it so complicated, I just want to send an e-mail, but I don't know what SMTP to use.

 

ok, I changed the php.ini file with:

 

[mail function]
; For Win32 only.
SMTP = smtp.googlemail.com
smtp_port = 465

 

and added the following to my .php script:

 

$to      = '[email protected]';
$subject = 'subject';
$message = 'messagesssss';
$headers = 'From: [email protected]' . "\r\n" .
    'Reply-To: [email protected]' . "\r\n";

mail($to, $subject, $message, $headers);

 

However, it doesn't seem to work. It just gets stuck...

 

 

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.