Post by Email using php mail() function

  • Author
    Posts
  • #627361

    Hi,

    I am trying to create a page to post articles via e-mail.

    the code is like;

    require_once(‘../class.phpmailer.php’);
    .
    .
    .
    .
    .
    $body = $_SESSION[‘rss_fullcontent’];
    $subject=$_SESSION[‘rss_title’];
    require_once(‘../smtpcheck/smtpvalidateclass.php’);
    $sender = ‘(my e-mail address)’;
    $SMTP_Valid = new SMTP_validateEmail();
    $result = $SMTP_Valid->validate(“(the secret e-mail address)”, $sender);
    if ($result[0]) {
    $mail = new PHPMailer();
    $mail->IsSMTP();
    $mail->IsHTML(true);
    $mail->Host = “127.0.0.1”;
    $mail->From = “‘(my e-mail address)”;
    $mail->FromName = “(My name)”;
    $mail->Sender = “‘(my e-mail address)”;
    $mail->AddAddress(“(the secret e-mail address)”);
    $mail->Subject = $subject;
    $mail->Body = $body;
    $mail->AltBody = strip_tags($body);

    if(!$mail->Send()) {
    $problems=”Failed to send to “.”(secret address)” – Mailer Error: ” . $mail->ErrorInfo;
    }
    } else {
    $problems=”Failed to send to “.”(secret address)”. ” – “.$result[1][0];
    echo $problems;
    }
    if ($problems) {

    } else {

    $autoaff->emailed=”yes”;
    $mail->ClearAddresses();
    $mail->ClearAttachments();
    }
    }

    I have been successfull on other blog site, but it doesn’t work on WordPress.com.
    There was no error showing, it’s just not updating.
    I tried e-mailing via mail client (outlook), it worked perfectly.

    Would you tell me what is causing this problem?

    The blog I need help with is businessinsure.wordpress.com.

    #627496

    auxclass
    Member

    If you are really doing that type of code you are not hosted on WordPress.COM.

    The site linked to your name does not appear to be hosted on WordPress.COM, this site is for support of sites hosted on WordPress.COM. You should make friends and address your questions to WordPress.ORG the keepers of the software you are using: http://wordpress.org/support/

    For more on the difference: http://support.wordpress.com/com-vs-org/

    If you are talking about a WordPress.COM hosted blog, then we need a link beginning with http to that blog please.

    #627501

    This code is from outsite WordPress.com or WordPress.org.

    I am just e-mailing from a page in a completely different server, and it is working for other blog sites such as Blogspot, Type Pad etc.

    This is the address of the blog.
    http://piiblog.wordpress.com/

    #627525

    Is anyone can answer my question?

    #627536

    elexious
    Member

    The site you gave us businessinsure the “http://piiblog.wordpress.com” has been suspended somehow you ended up not following the rules of some sort. Did you read the code of conduct?

    Thanks,
    Administrator of http://www.elexiouschilds.wordpress.com

    #627538

    timethief
    Member

    @businessinsure

    piiblog.wordpress.com is no longer available.
    This blog has been archived or suspended for a violation of our Terms of Service.
    For questions or concerns, contact WordPress.com Support.

    I’m sorry but this is not a matter for posting to a public forum. We Volunteers answering support questions have no role to play in this process. This is between you and Staff. You have a warning notice on your dashboard with a link in it. Please click that link.

    If you contacted Staff by using the “click here to contact us” link in the notice, the ToS department definitely received your request. Please be patient as they’ll be getting back to you as soon as they can.

    Reference links:
    http://en.support.wordpress.com/suspended-blogs/
    http://wordpress.com/types-of-blogs/
    http://en.support.wordpress.com/advertising/
    http://en.wordpress.com/tos/

    As a policy, please refrain from discussing ToS issues on the public forums. Thank you for your patience.

The topic ‘Post by Email using php mail() function’ is closed to new replies.