Giter Site home page Giter Site logo

mailgun.perl's People

Contributors

gtsafas avatar spiros avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

mailgun.perl's Issues

Support for multiple tags

https://documentation.mailgun.com/user_manual.html#tagging

Mailgun supports up to 3 tags per email. Each tag is sent as a separate post-param. But since the send-method takes a hashref as input, only one tag can be added. Possible fix would to add a special key tags with arrayref as value, which then gets unpacked into separate post-params. Pretty much exactly like attachments in version 0.5

$mg->send({
   subject => 'Your account for xyz',
   ....
   tags => ['adminmail', 'newuser']
});

Support asynchronous UA requests

The real reason I was interested in issue #5 was that the clean-up would make it easier to swap out the useragent for one that can perform the HTTP requests asynchronously.

This is particularly useful, for example, in a web application where you want to send an email as part of a registration request. Naive code would make the email request send asynchronously. Yes, one could fork as well but that's also a bit overkill.

Mojo::UserAgent seems a prime candidate for achieving this, particularly as I'm using Mojolicious anyway.

I'll assign this issue for now and will look at it when 1) The DRY clean-up is agreed and done and 2) Performance dictates I actually need the async capability for sure!

"Requested Item doesn't exist"

I get an error Not Found - The requested item doesn’t exist at /usr/local/share/perl5/WWW/Mailgun.pm line 60. using version WWW::Mailgun is up to date (0.4).

My code is below (for testing):

#!/usr/bin/perl -w
use strict;
use warnings;
use Date::Manip;
use MIME::Lite;

my $to = 'To Name <[email protected]>';
my $from = '[email protected]';
my $to_name = 'To Name';
my $to_email = '[email protected]';
my $subject = 'Testing Subject';
my $msg = 'Testing Message';

my $body = $msg;

use WWW::Mailgun;

my $mg = WWW::Mailgun->new({ 
  key => 'KEYREDACTED',
  domain => 'domain.com',
  from => $from
});

$mg->send({
    to      => $to,
    subject => $subject,
    text    => $body,
    html    => $body
});

Campaigns support

How may I help?

I sent an email here [email protected] but it had a delivery failure.

I’m going all in with Mailgun to replace a proprietary email marking system and will be using WWW::Mailgun.

How may I help with the Todo list? Should I just jump in or would you like to provide some direction? Specifically for now I’m interested in the Campaigns bit.

To the future,
Billy Carr

Requires perl-Crypt-SSLeay, not listed.

Hi, I just tried to install on CentOS and could not complete the test. I had to do
yum install perl-Crypt-SSLeay to get it working.

Error message was:
malformed JSON string, neither array, object, number, string or atom, at character offset 0 (before "LWP will support htt...") at /usr/local/share/perl5/WWW/Mailgun.pm

Missing Test::MockModule dependency.

WWW::Mailgun fails to build with cpanm with the error: Can't locate Test/MockModule.pm

Installing Test::MockModule before fixes this issue.
It looks like you need to add Test::MockModule as a dependency.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.