Jump to content

Deoctor

Members
  • Content Count

    663
  • Joined

  • Last visited

Community Reputation

0 Neutral

About Deoctor

  • Rank
    Prolific Member
  • Birthday 06/10/1985

Contact Methods

  • MSN
    ym_chaitu@hotmail.com

Profile Information

  • Gender
    Male
  • Location
    Bangalore
  1. dude just try this code. this will work u have to autenticate ur mail or else ur mail sever thinks that some one is useing it without a valid username and password. this is called as ssl in plain terms.. <?php require_once "Mail.php"; $from = "vk@xyz.com"; $to = "[email]yourmail@yaourdomain.com[/email]"; $subject = "Hi!"; $body = "<h1>Hi</h1>,\n\nHow are you?"; $host = "mail.example.com"; $username = "smtp_username"; $password = "smtp_password"; $headers = array ('From' => $from, 'To' => $to, 'Subject' => $subject); $smtp = Mail::factory('smtp', array ('host' => $host, 'auth' => true, 'username' => $username, 'password' => $password)); $mail = $smtp->send($to, $headers, $body); if (PEAR::isError($mail)) { echo("<p>" . $mail->getMessage() . "</p>"); } else { echo("<p>Message successfully sent!</p>"); } ?> note: you should have pear installed in your machine already to use this..
×

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.