Possible Duplicate:
Send email using GMail SMTP server from PHP page
I have been trying to send a mail to my own gmail address using php's mail function. I wanted to know how it really works. I enabled the required pop and imap settings in my gmail account. It failed. Googling it gave me some solutions as to add some lines like ini_set("SMTP","smtp.gmail.com"); ini_set("smtp_port","587"); to my code. But this too didn't really work out. I get the error message as :- SMTP server response: 530 5.7.0 Must issue a STARTTLS command first. xu6sm18854524igb.7 any ideas where am i going wrong ?