I am making an administrative type plugin, and would like to know how I might go about implementing the php Email feature. I am assuming that I would have to edit the php bin file and add the dependency, but I am probably wrong. I would like to know how I could somehow have my plugin utilize the php email feature, without having the user download the dependency and implement it themselves. I hope this thread will be useful to other plugin makers. Server owners would be able to have a plugin that would send them server reports to their inbox.
It should work the same as in a website. Just without HTML etc. http://www.inmotionhosting.com/supp...page/using-phpmailer-to-send-mail-through-php
Thanks, I'm just wondering how I would add the php mailer script to pocketmine so my plugin could use it.
PHP: $to = '[email protected]';$subject = 'the subject';$message = 'hello';$headers = 'From: [email protected]' . "\r\n" . 'Reply-To: [email protected]';mail($to, $subject, $message, $headers);
Wait are you saying that would work? If I plugged it into a plugin it would actually email you!? I was thinking you would need to somehow download the mail extension for php.
Wow okay, I'll try it out! Now I am excited. I was under the impression that you would have to edit the php bin file and add a mail dependency.
I haven't had the chance to test it but I'll whip something up. I'll say one thing about the new api, it takes a lot longer to make a plugin
You could always write an SMTP client, but the encrypted login with SSL might be hard. Same goes for POP3.
True, I didn't even think of that, you would need an email account to send the emails, and that would need a password. Well this just got a lot more interesting.
No. That is not the point. The email account only needs password when you access the email server from a separate network. For example you need password to login into [email protected] because if you send a mail directly from your address, you will not send as @gmail.com but maybe as @tuff.net (LOL), so that is not my point. With the mail extension, you will send as your IP address for the domain (after the "@").
Ya sorry I just got your point. I'd be interested to see what the sender address is as well. Still haven't gotten around to making a test plugin though so I'll have to wait and see.
With this i guess I could edit simple auth and that when u make a password it will ask for your email so if you forget your password the server will email it to the guys email How about texting from the server?