Advertisement
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

PHP mailer?

Comments in 'Plugin Development' started by Falk, Nov 2, 2013.

  1. TrilogiForce
    Offline

    TrilogiForce Ban Evader Banned

    Joined:
    Sep 7, 2013
    Posts:
    228
    Minecraft User:
    TrilogiForce
    HEY CAN I MAKE THE PLGUIN!
  2. Falk
    Offline

    Falk Staff Member Global Moderator

    Joined:
    Sep 2, 2013
    Posts:
    1,706
    Plugins:
    22
    Minecraft User:
    Falkirknh
    But making it is the fun part :p
  3. TrilogiForce
    Offline

    TrilogiForce Ban Evader Banned

    Joined:
    Sep 7, 2013
    Posts:
    228
    Minecraft User:
    TrilogiForce
  4. TrilogiForce
    Offline

    TrilogiForce Ban Evader Banned

    Joined:
    Sep 7, 2013
    Posts:
    228
    Minecraft User:
    TrilogiForce
    hey glitch how can i put a email forma command i just know from a config file
    example:
    /sendemail [your mail] [players mail] [subject] [message]
  5. Falk
    Offline

    Falk Staff Member Global Moderator

    Joined:
    Sep 2, 2013
    Posts:
    1,706
    Plugins:
    22
    Minecraft User:
    Falkirknh
    That's pretty easy to do. I can make a quick script to do that.
  6. Glitchmaster_PE
    Offline

    Glitchmaster_PE Notable Member Plugin Developer

    Joined:
    Aug 31, 2013
    Posts:
    834
    Plugins:
    8
    Minecraft User:
    Glitchmaster_PE
    Hmm, maybe use the mail function in the public function
  7. TrilogiForce
    Offline

    TrilogiForce Ban Evader Banned

    Joined:
    Sep 7, 2013
    Posts:
    228
    Minecraft User:
    TrilogiForce
    please help me on that!
    lets make that plugin form a
    "plugin developer team"
    it just sound like so kid
  8. TrilogiForce
    Offline

    TrilogiForce Ban Evader Banned

    Joined:
    Sep 7, 2013
    Posts:
    228
    Minecraft User:
    TrilogiForce
    why do i say form and not from!
  9. TrilogiForce
    Offline

    TrilogiForce Ban Evader Banned

    Joined:
    Sep 7, 2013
    Posts:
    228
    Minecraft User:
    TrilogiForce
    PHP:
    <?php
    $to 
    '[email protected]';$subject 'the subject';$message 'hello';$headers 'From: [email protected]"\r\n" .'Reply-To: [email protected]"\r\n" .'X-Mailer: PHP/' phpversion();mail($to$subject$message$headers);?>
    its a good sender its short and good
  10. TrilogiForce
    Offline

    TrilogiForce Ban Evader Banned

    Joined:
    Sep 7, 2013
    Posts:
    228
    Minecraft User:
    TrilogiForce
    ok i have to sleep b'cause i have to wake up at 7:00 am!
  11. Falk
    Offline

    Falk Staff Member Global Moderator

    Joined:
    Sep 2, 2013
    Posts:
    1,706
    Plugins:
    22
    Minecraft User:
    Falkirknh
    Looks great, just finishing my sender to work with the params.
  12. Falk
    Offline

    Falk Staff Member Global Moderator

    Joined:
    Sep 2, 2013
    Posts:
    1,706
    Plugins:
    22
    Minecraft User:
    Falkirknh
    Okay here is what I got this would be the function called on the command:
    PHP:
    $message array_slice($params3);
    $fulltext explode(" ",$message)
    $to $params[1];
    $subject $params[2];
    $headers "From: " $params[0] . "\r\n";
    $headers .= "Reply-To: "$params[0] . "\r\n";
    mail($to,$subject,$fulltext,$headers);
  13. Glitchmaster_PE
    Offline

    Glitchmaster_PE Notable Member Plugin Developer

    Joined:
    Aug 31, 2013
    Posts:
    834
    Plugins:
    8
    Minecraft User:
    Glitchmaster_PE
    looks pretty good
  14. Falk
    Offline

    Falk Staff Member Global Moderator

    Joined:
    Sep 2, 2013
    Posts:
    1,706
    Plugins:
    22
    Minecraft User:
    Falkirknh
    Thanks!
  15. wies
    Offline

    wies Notable Member

    Joined:
    Aug 23, 2013
    Posts:
    390
    I would suggest using imap_mail() function because the emails send with mail() are mostly marked as spam
  16. Falk
    Offline

    Falk Staff Member Global Moderator

    Joined:
    Sep 2, 2013
    Posts:
    1,706
    Plugins:
    22
    Minecraft User:
    Falkirknh
    Very true but then you would have to have the IMAP settings defined in php.ini
    If you send the mail in a none spammy plain text format it won't likely be market as spam by the recipient
  17. wies
    Offline

    wies Notable Member

    Joined:
    Aug 23, 2013
    Posts:
    390
    If you send a email with a imap email address with mail() it will be marked as spam or fail.
    You need to login before you can send a mail
  18. Falk
    Offline

    Falk Staff Member Global Moderator

    Joined:
    Sep 2, 2013
    Posts:
    1,706
    Plugins:
    22
    Minecraft User:
    Falkirknh
    That's not what has happened in my experience. If you attempt to put a gmail address as the from and send to another gmail them that will get you a high spam score.
  19. Falk
    Offline

    Falk Staff Member Global Moderator

    Joined:
    Sep 2, 2013
    Posts:
    1,706
    Plugins:
    22
    Minecraft User:
    Falkirknh
    I find that Gmail won't event block empty from addresses using the mail() function.
  20. wies
    Offline

    wies Notable Member

    Joined:
    Aug 23, 2013
    Posts:
    390
    Oh, I thought so, I've never checked it.

Share This Page

Advertisement