Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
mits-techreceptives opened this issue Sep 27, 2016 · 5 comments
Closed

Comments

@mits-techreceptives
Copy link

i am using mailgun yii2 extension which have mailgun-php .
when i am trying to sending mail , it throws below error:
Mailgun\Connection\Exceptions\MissingEndpoint
The endpoint you've tried to access does not exist. Check your URL.

Mailgun V3 i am using. and in mailgun php api , it trying to connect with api.mailgun.net endpoint.
so how to fix it ?

@DavidGarciaCat
Copy link
Collaborator

Reading your issue description and the README.md file I assume you're using this Framework Integration: katanyoo/yii2-mailgun-mailer for Yii2

Given this case, you should open an issue on that repository, given katanyoo is not mailgun so Mailgun is not the owner of that framework integration.

Regards,

@mits-techreceptives
Copy link
Author

I am using this one : https://github.com/boundstate/yii2-mailgun
but internally its making calling through mailgun-php package. so i thought to ask solution over here.

@DavidGarciaCat
Copy link
Collaborator

This is the Mailgun way to send an email:

# First, instantiate the SDK with your API credentials and define your domain. 
$mg = new Mailgun("key-example");
$domain = "example.com";

# Now, compose and send your message.
$mg->sendMessage($domain, array('from'    => 'bob@example.com', 
                                'to'      => 'sally@example.com', 
                                'subject' => 'The PHP SDK is awesome!', 
                                'text'    => 'It is so simple to send a message.'));

And this is the one that you're using given the repository that you say you're using:

Yii::$app->mailer->compose('contact/html', ['contactForm' => $form])
    ->setFrom('from@domain.com')
    ->setTo($form->email)
    ->setSubject($form->subject)
    ->send();

As you can see the Yii code is not the same than Mailgun code.

Given this case, you have 2 options:

  1. Open an issue on https://github.com/boundstate/yii2-mailgun and wait to get an update
  2. Use Mailgun-PHP repository and send emails using the original SDK instead of an external resource

Regards,

@Nyholm
Copy link
Collaborator

Nyholm commented Sep 30, 2016

This issue is related to #130 and #174.

@mits-techreceptives Please do not comment on multiple issues/thread with same problem.

Thank you @DavidGarciaCat for your answers.

@Nyholm Nyholm closed this as completed Sep 30, 2016
@mits-techreceptives
Copy link
Author

@Nyholm yeah.. sorry man !! as in hurry .. forget this one

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants