Code Monkey home page Code Monkey logo

mailgun's Issues

Composer does not like "v"

"bogardo/mailgun": "v3.0."
"bogardo/mailgun": "v2.
"

Should be

"bogardo/mailgun": "3.0."
"bogardo/mailgun": "2.
"

WebRoot]$ composer update
  [UnexpectedValueException]                                                  
  Could not parse version constraint v3.0.*: Invalid version string "v3.0.*"  

Failed to install bogardo/mailgun, version 4.0.0

Hi,

I am using Laravel 5.2 with the latest version of guzzlehttp/guzzle [6.2.1]. When I try to install bogardo/mailgun, get the following error:

C:\xampp\php\php.exe C:/xampp/htdocs/project-name/composer.phar require bogardo/mailgun:4.0.0 -n --no-progress
./composer.json has been updated
Loading composer repositories with package information
Updating dependencies (including require-dev)
Your requirements could not be resolved to an installable set of packages.

Problem 1
- mailgun/mailgun-php v1.8 requires guzzlehttp/guzzle ~5.0 -> satisfiable by guzzlehttp/guzzle[5.0.0, 5.0.1, 5.0.2, 5.0.3, 5.1.0, 5.2.0, 5.3.0, 5.3.1, 5.3.x-dev] but these conflict with your requirements or minimum-stability.
- bogardo/mailgun 4.0.0 requires mailgun/mailgun-php ^1.8 -> satisfiable by mailgun/mailgun-php[v1.8].
- Installation request for bogardo/mailgun 4.0.0 -> satisfiable by bogardo/mailgun[4.0.0].

Installation failed, reverting ./composer.json to its original content.

So, it seems that this package doesn't work with the latest version of guzzle... Can I expect this package to work with the latest version of guzzle any time soon, or I need to remove the current version and install 5.3.1?

Laravel 5

I realize laravel 5 is not yet released but we are getting very close. Would be really great to have the Mailgun package working with laravel 5 when it's released. Your package is such a great package. Many thanks for all you work. It's been a life saver.

Method Mail::raw() not supported

Because Mail::raw() is not supported, it is mandatory that a view is passed, but in cases where you rendered the view before to execute some parsing function, like using CSSInline class, you cant just pass the parsed data to Mailgun::send.

Credentials incorrect

When you have time can you help me figure this out? I have installed this properly and now I can't get it to work. Says "Credentials Incorrect". I have published the package, filled out the config.php properly. Have no idea why it is not working.

Any ideas on what I could try?

Support Laravel 4.0 broken

With the latest update to the repo, support for laravel 4.0 has been dropped, en because there is no versioning or branches in your project, I am not able to install an earlier version. Can this be fixed?

No issue, just a thanks!

Was super easy to drop this in and change the application Mail alias and update all our mailgun sends (SMTP is way too slow). Thanks! :)

The parameters passed to the API were invalid. Check your inputs!

I'm using laravel 4.2. I try bellow example, but it does not work. It occur bellow error.
"The parameters passed to the API were invalid. Check your inputs".

=> Code
$data = array(
'customer' => 'John Smith',
'url' => 'http://laravel.com'
);
Mailgun::send('emails.layout', $data, function($message)
{
$message->to('[email protected]', 'John Smith')->subject('Welcome!');
});

=> View file code
Hi {{ $customer }},
Please visit {{ $url }}

[Insight] Commented code should not be commited - in src/Bogardo/Mailgun/Mailgun.php, line 100

in src/Bogardo/Mailgun/Mailgun.php, line 100

Commented out code reduces readability and lowers the code confidence for other developers. If it's common usage for debug, it should not be committed. Using a version control system, such code can be safely removed.

        $this->callMessageBuilder($callback, $this->message);

        $this->getMessage($view, $data);


        //dd($this->getMessageData());

        $this->mailgun()->sendMessage(Config::get('mailgun::domain'), $this->getMessageData(), $this->getAttachmentData());
    }

    /**

Posted from SensioLabsInsight

Add support for queues

While working on the project I use Mailgun for, we've come across a slight issue.

Although Mailgun is a lot faster than using plain old SMTP to send emails, it still induces quite a delay at one stage of the process, basically we need to send custom emails out to (possibly) hundreds of people at one time.

One feature of Mail that this package doesnt replicate is Mail::queue. It would be super useful if that was able to be implemented. Is this something that would be possible?

Thanks for your work on this so far, it's helped in so many ways!

James

Batch Sending Mail Issue

Hi Bogardo,

I am trying to send a batch mail to multiple recipients at the same time using below code using Laravel framework.

Mailgun::send('emails.mudrush', $data, function($message) use($users)
{                   
    $message->subject('Last day to WIN free passes to The Mud Rush' );
    $message->to($users);
});

If you see $users array has all the emails of the users. Now the issue is every user is able to see all the other users emails.

But we don't want to visible all the users emails.

The endpoint you've tried to access does not exist. Check your URL.

I've same issue. app develop using laravel 4.2, this package installed correctly. I'm working on local environment plan to send emails via mailgun API
Error is :

Mailgun \ Connection \ Exceptions \ MissingEndpoint 
The endpoint you've tried to access does not exist. Check your URL. 

Domain and API set in services.php

'mailgun' => array(
        'domain' => 'sandboxe786b43f2c3447fdaf02258fae929ab8.mailgun.org',
        'secret' => 'xxxxxx2833725df29b4ad6bbaadc1d9',)

can you help me to sort it out ?

Unable to get Campaigns working

Hi Bogardo,

Thanks for this brilliant tool but I am hoping you could give me an example of how to include a campaign id. I have had a number of attempts but I cannot get it right.

Neither of these work and I'm hoping you can point me in the right direction (I would have asked on the Laravel forum but it is moving and laravel.io isn't working).

$message->data('X-Mailgun-Campaign-Id', "{'o:campaign': '001_invitation_requests'}");
$message->data('o:campaign', '001_invitation_requests');
$message->data('X-Mailgun-Campaign-Id', '001_invitation_requests');

Thanks in advance and Thanks again for the repo.
John

Guzzle 6

Hello I've been using this plug in without any issue. However, with my last update on my project where I'm using "guzzlehttp/guzzle:~6.1.1", "guzzlehttp/oauth-subscriber: dev-master" for Oauth. So now composer wouldn't install the plug in due to dependency version. So I wanted to ask you guys whether, you are planning to update your project any sooner, or any workaround.

Wrong message id for email header causing emails to go straight to spam in some servers

Some emails that I send keep getting put into the spam folders of some email servers.
I poured through your docs to maybe pinpoint the issue, but could not.

I contacted Mailgun support to maybe shed some light on the issue, and they said it could be that my 'message-id' in my email header is wrong since it shows 'Message-Id: 282dc62aa198e497a5358f0aeeff56da@localhost. He mentioned that it should, in reality, be the same as the 'From:' address in the email.

Maybe this is a bug on your end? If not, please let me know common causes of this issue, if you have knowledge of them.

Recipients from previous messages included in new messages

Hi again :)

There seems to be a bug when multiple emails are sent - in the example code below, the first email is correctly sent to [email protected], but the second email is incorrectly sent to both [email protected] and [email protected]. It should, of course, only be sent to [email protected]

Mailgun::send('emails.test', $data, function($message) {
            $message->to('[email protected]', 'Recipient One')->subject('Mailgun Test!');
});

Mailgun::send('emails.test', $data, function($message) {
            $message->to('[email protected]', 'Recipient Two')->subject('Mailgun Test!');
});

Guzzle Dependency issues

It appears the bogardo/mailgun 4.0.* for Laravel 5 package has a conflict with one of my other packages.

My other package requires guzzlehttp/guzzle 6.1.1 but when I try to add this package I get a composer error:

  • Conclusion: don't install guzzlehttp/guzzle 6.1.x-dev
  • Conclusion: don't install guzzlehttp/guzzle 6.1.1
  • mailgun/mailgun-php v1.8 requires guzzlehttp/guzzle ~5.0 -> satisfiable by guzzlehttp/guzzle[5.3.x-dev].
  • Can only install one of: guzzlehttp/guzzle[6.1.0, 5.3.x-dev].

Can this be changed so your package has a MINIMUM requirement for guzzle 5.0. Having a newer version of Guzzle should not inhibit the installation of this package.

Laravel 5.3 and Mailable Support

Laravel 5.3 is out. =)

I like their new Mailables feature. Mail::to($request->user())->send(new OrderShipped($order));

Mailgun documentation doesn't suggest this is feasible yet. Thought I'd mention it.

Lists not working for me.

I upgraded to the latest. - Installing bogardo/mailgun (v3.1.2)

Error
Call to undefined method Bogardo\Mailgun\Mailgun\Lists::member()

myCode
$mail = Mailgun::lists()->member("[email protected]", "[email protected]");
print_r($mail);

Also tried

myCode
Mailgun::lists()->members("[email protected]");

Error
Call to undefined method Bogardo\Mailgun\Mailgun\Lists::members()

No idea what is wrong.

callback for Mailgun::send function if it is send or fails

sir please help me to have method so that i can know that the message are sent or fails so that i can apply callbacks response Example method "Mailgun::failures()"

Mailgun::send('emails.welcome', $data, function ($message) {
    $message->to('[email protected]', 'John Smith')->subject('Welcome!');
});
//i am happy if this Mailgun::failures will be added for easy callback response
if (Mailgun::failures()) {
    $result['success'] = 'false';
    $result['msg'] = 'There was an error while sending the email. Please try again';
}
else {
    $result['success'] = 'true';
    $result['msg'] = 'Email successfully sent';
}

return $result;

Question on Mailgun Endpoint URL

Hi,

First of all, thank you for this awesome package. Very easy to use!

However, I have a question. On my local machine, the sending of email works perfectly fine. However when I deployed it to my test server, I keep getting the ff. error:

Mailgun \ Connection \ Exceptions \ MissingEndpoint
The endpoint you've tried to access does not exist. Check your URL.

Is there anything that I miss or I have to configure when deploying?

Thanks,
Ridvan

Bogardo/Mailgun and Password Reminders - Class 'Bogardo\Mailgun\MailgunApi' not found

I have used this package several times on a number of projects but this is the first time I am using with Password Reminders.

I followed the instructions given here: http://bogardo.com/mailgun-and-password-reminders/. I had issues with creating a namespace for the two new files but I had that resolved by using the autoload section of composer.json. Now, when I load the reminder form supply my e-mail address and submit (posts to password/reset), I get the following error and I do not get the password reset e-mail:

Symfony \ Component \ Debug \ Exception \ FatalErrorException (E_ERROR) Class 'Bogardo\Mailgun\MailgunApi' not found Open: ....../vendor/bogardo/mailgun/src/Bogardo/Mailgun/Mailgun.php

In the vendor folder, I can see the MailgunApi class here: Bogardo\Mailgun\Mailgun\MailgunApi. How do I resolve this issue? Let me know if you need more information.

I am using Laravel 4.2

Attachments appearing inline

Attaching files to the email works . . . but the attachment also appears inline in the email.
This is the code used:
$message->attach(data['path'], $data['name']);
How to prevent it appearing inline?

size limits in the data array?

When sending emails, one of my email methods has a couple of object passed to the view along with a few variables. When I leave the data array empty or just pass the variables it sends just fine, when passing in the objects I get an InvalidCredentials error:

exception 'Mailgun\Connection\Exceptions\InvalidCredentials' with message 'Your credentials are incorrect.' in /srv/www/example.dev/deploy/match/vendor/mailgun/mailgun-php/src/Mailgun/Connection/RestClient.php:130

Yes I saw #33, but this is different, I have no problems with the validating emails, and emails are sending most of the time.

This one works everytime: (only 2 or 3 variables are passed through $data)

    private function sendTo(User $user, $subject, $view, $data = [], $from = '') {
        return Mailgun::send($view, $data, function ($message) use ($user, $subject, $from) {
            if($from) {
                $message->from($from);
            }
            $message->to($user->email, $user->full_name)
                ->subject($subject);
        });
    }

This one does NOT work: (two object and 3 variables are being passed to $data)

    private function sendToAdmin($adminEmail, $subject, $view, $data = []) {
        return Mailgun::send($view, $data, function ($message) use ($adminEmail, $subject) {
            $message->to($adminEmail)
                ->subject($subject);
        });
    }

when changing the $data to an empty array in the send method it sends.

The parameters passed to the API were invalid. Check your inputs!

Hello,
This is my code:

$to           = '[email protected]';
$subject      = 'offline';
$html_message = 'test offline';

$data = array(
    'customer' => 'John Smith',
    'url' => 'http://laravel.com'
);

Mailgun::send('mail', $data, function($message) use ($to,$subject)
{
    $message->to($to, 'John Smith')->subject($subject);
});

But it show error which is:
The parameters passed to the API were invalid. Check your inputs!
Can you explain ?
Thank you

Plain text emails

Hi,

With Laravel's Maill class you can send plain text emails like this:

Mailgun::send([], [], function($message) {

    });

Is there a way to do this with Mailgun::?
I get a setBody() error atm.

SSL Certificate problem

By sending mail following error show:

RequestException in RequestException.php line 51: cURL error 60: SSL certificate problem: unable to get local issuer certificate

How to solve it?

Lacking List features

Hey,
I like your package. kindly add List support (i.e. Adding to List, removing, updating etc)

Cheeers!

Sending to multiple recipients

What's the best way to send an email to multiple recipients?

Ideally, I'd like to be able to pass an array of email addresses to the $message->to() function, like you can using Laravel's default Mail object.

Support for recipient variables when batch-sending

From the manual: http://documentation.mailgun.com/user_manual.html#batch-sending when batch-sending, Mailgun only knows to send emails to individual recipients (i.e. one recipient in the 'to' field) when you use recipient variables. Batch sending has an advantage over using the Mailgun::send in a loop since there's only one API call with the former therefore less loading time for the user. And then there's the advantage of using the same to personalise the emails.
Could you kindly add this feature?

Great work!

Publish config get following error

I am using Laravel 4.2.*. I install this lib using composer and when i am trying to publish config i am getting following error

[InvalidArgumentException] There are no commands defined in the "vendor" namespace

How to solve this.

Additional config

I recommend adding one small thing to the configuration, i.e.

Add the following alias to the aliases array in your app/config/app.php file.
'Mailgun' => 'Bogardo\Mailgun\Facades\Mailgun'

It's easier to "use Mailgun" this way. Thanks.

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.