Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have this code

 $mail->SMTPAuth = true;
 $mail->SMTPSecure = "ssl";
 $mail->Host = "";
 $mail->Port = 465;
 $mail->Username = "username";
 $mail->Password = "pass";
 $mail->SetFrom("", "");
 $mail->AddReplyTo("", "");
 $mail->AddAddress($this->email, $this->username);
 $mail->Subject = "Activate Your Account";
 $mail->Body = $message;`enter code here`

How i configure my postfix/sendmail or whatever server to actually work and send the mail?

This has been driving me insane! I've tried numerous times to configure these servers.

I just want to be able to send emails via my php script...

Can someone please link me to a guide to get this all going? or just provide help themselves?

Maybe there is an alternative way i can use to send my email in the php script?

Basically, i need help just getting the emails to send...

share|improve this question
It isn't clear from your code, but do you call a $mail->send() method later? Does it return any errors? – Zoredache Jan 25 '10 at 5:11
ya i do call the $mail->Send() below, sorry forgot to include it. It tells me it was unable to connect. – jiexi Jan 25 '10 at 5:34

Isn't this question should be placed on StackOverflow instead of here? Try telnet on 465 port, are you sure that the service is available on this exact port? If it is available, you will see something like this in your terminal: "220 ..." If it is available on this exact port, try this:

$mail->Port = "465";
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.