I have this code

 $mail->SMTPAuth = true;
 $mail->SMTPSecure = "ssl";
 $mail->Host = "mail.craze.cc";
 $mail->Port = 465;
 $mail->Username = "username";
 $mail->Password = "pass";
 $mail->SetFrom("register@craze.cc", "craze.cc");
 $mail->AddReplyTo("register@craze.cc", "craze.cc");
 $mail->AddAddress($this->email, $this->username);
 $mail->Subject = "Activate Your Craze.cc 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...

  • 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 mail.craze.cc ..." If it is available on this exact port, try this:

$mail->Port = "465";

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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