Mail::Client::Yahoo - Programmatically access Yahoo's web-based email
use Mail::Client::Yahoo; $y = Mail::Client::Yahoo->login( username => 'bob', password => 'secret', secure => 1, # for the paranoid and patient ); $y->select_folder('Inbox'); $m = $y->message(0); # is equivalent to... @ids = $y->message_list(); $y->message($id); $y->delete_message(0); $y->logout();
This module allows you to access your web-based Yahoo Mail account programatically. Similar in function to Mail::Webmail::Yahoo, this module is more geared towards manipulation of individual messages, rather than simple bulk download. This module is also probably more reliable than Mail::Webmail::Yahoo, as well.
Creates a new Mail::Client::Yahoo object, and logs in to the Yahoo Mail server. You must include the
password options. (The username and password is sent over a secure HTTPS connection.)
You may also include an
error option, which should be a reference to a subroutine to be called if there is an error. The default handler simply dies.
You may also include a
secure option, which should be either 0 or 1. If
secure is 1, the session uses a secure HTTPS connection, instead of a standard HTTP connection (the default). Note that the secure connection will be slower, and the username and password are always sent over HTTPS, regardless of the value of
Log out, and disconnect from the server.
Returns a list of the names of all available folders.
Selects the current working folder. This must be done before any of the message methods may be used.
Returns the size of a folder, as give by Yahoo. This size will usually be a string ending in `K', which gives the number of kilobytes in the message. This is not an exact size.
Returns the number of messages in a folder.
Returns an array containing the message-id's of all the messages in the current folder.
Returns the size of the message, as given in the folder listing. As with the folder size, it is not exact, and will most likely be a number followed by a `K' or `M', indicating kilobytes and megabytes, respectively.
Note: The parameter passed may either be a message-id, such as returned from the "message_list( )" function, or the index of a message in that list.
Returns a Mail::Header object containing the headers of the message.
Returns a Mail::Internet object containing the body of the message. Note that the returned object contains only the body of the message; the headers are left empty.
This is the complete (possibly MIME-encoded) message body, including any attachments.
Returns a Mail::Internet object containing both the headers and body of the message.
This is the complete message, including any attachments.
Moves a message from the current folder to another folder.
Moves a message from the current folder to the special Trash folder. Note that the Trash folder is not emptied automatically (though it may be purged by Yahoo at random times).
Sends a message via the Yahoo website. You must specify a primary recipient via
subject, and a
body. You may also specify additional recipients via
bcc, a boolean indicating whether to save the message in your Sent folder via
save, and a boolean indicating whether the body contains HTML formatting via
Additionally, you can specify an array reference via
attach containing a list of up to three file names to upload as attachments.
Removes all messages from the Trash folder. These messages are permanently lost.
Copyright (C) 2004, Cory Johns.
This module is free software; you can redistribute and/or modify it under the same terms as Perl itself.
Address bug reports and comments to: Cory Johns <email@example.com>