Email::Send::Gandi - Send Messages using Gandi
#!/usr/bin/perl use strict; use warnings; use Email::Send; use Email::Send::Gandi; use Email::Simple::Creator; my $email = Email::Simple->create( header => [ From => 'magic_monitoring@Gandi.com', To => 'acme@astray.com', Subject => 'Server down', ], body => 'The server is down. Start panicing.', ); my $sender = Email::Send->new( { mailer => 'Gandi', mailer_args => [ username => 'magic_monitoring@Gandi.com', password => 'XXX', ] } ); eval { $sender->send($email) }; die "Error sending email: $@" if $@;
Gandi.net is a domain name registrar which provides email accounts. This module is a mailer for Email::Send that sends a message using Gandi's authenticated SSL SMTP service. You must have a Gandi account, and a Gandi Mail mailbox.
Email::Send
You should pass in the username and password for the Gandi mailbox. Sending emails can fail for many reasons and this module croaks upon any errors.
The envelope sender and recipients are, by default, generated by looking at the From, To, Cc, and Bcc headers. This behavior can be modified by replacing the get_env_sender and get_env_recipients methods, both of which receive the Email::Simple object and their only parameter, and return email addresses.
get_env_sender
get_env_recipients
Copyright (C) 2008, Leon Brocard
This module is free software; you can redistribute it or modify it under the same terms as Perl itself.
To install Email::Send::Gandi, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Email::Send::Gandi
CPAN shell
perl -MCPAN -e shell install Email::Send::Gandi
For more information on module installation, please visit the detailed CPAN module installation guide.