Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- // easymail php api
- $username = "sharon";
- $password = EasyMaill::getPassword($_POST);
- EasyMail::authenticate($username, $password);
- EasyMail::sendMail("bobby@businessname", "Subject", "The message should be put here. Use HTML where possible.");
- // using the API, you can create a new group
- $group = EasyMail::addGroup("businessname"); // must be authenticated. returns the group's name
- // you can add users to groups
- EasyMail::addUser("username", "password", $group);
- // removing a user from a group must be done from the website due to the need to download emails
- // checking email is simple
- $unread = EasyMail::unreadCount("All"); // you can check how many unread emails you have
- foreach(EasyMail::checkMail("Inbox") as $email){
- // the checkMail WILL NOT read the email. It will provide basic information
- echo $email['sender'] . " sent you an email " . $email['readableTimestamp'] . " (E-Mail ID: " . $email['emailID'] . ")";
- }
- // If you know the ID of an email, it can be read provided the authenticated user's address matches the recipient address
- EasyMail::readMail(1238832910);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement