-2

how i can send mail by direct link. code:

curl -s --user 'api:YOUR_API_KEY' \
https://api.mailgun.net/v3/YOUR_DOMAIN_NAME/messages \
-F from='Excited User <mailgun@YOUR_DOMAIN_NAME>' \
-F to=YOU@YOUR_DOMAIN_NAME \
-F to=bar@example.com \
-F subject='Hello' \
-F text='Testing some Mailgun awesomeness!'

Can anyone convert this code to link

1 Answers1

0

You have the variable to two times, each variable can be there only once. Otherwise it would look like this:

https://api.mailgun.net/v3/YOUR_DOMAIN_NAME/messages?from=%27Excited User <mailgun@YOUR_DOMAIN_NAME>%27&to=bar@example.com&subject=%27Hello%27&text=%27Testing some Mailgun awesomeness!%27

lofihelsinki
  • 2,491
  • 2
  • 23
  • 35
  • thanks but it's return Method Not Allowed The method is not allowed for the requested URL. – Abdul KariM Aug 28 '18 at 19:48
  • Ok, the request needs to be a POST request, not a GET request. You will have to create a hidden form on the page and then send it with JavaScript. See the answer in this post to get forward: https://stackoverflow.com/questions/3915917/make-a-link-use-post-instead-of-get – lofihelsinki Aug 29 '18 at 05:11
  • thanks , how i can me create module in vb.net to sendmail ? – Abdul KariM Aug 30 '18 at 08:23
  • If you use mailgun, you won't need sendmail. Just create a HTML form and trigger it to submit form a button, as in the previous comment's link. – lofihelsinki Aug 30 '18 at 11:13
  • mailgun it's send just for my email i want send for all people – Abdul KariM Aug 31 '18 at 01:29
  • You need to have a mail server, such as sendmail and a web server, such as Apache in front of the mail server to relay the GET/POST requests from the browser to the mail server. `Browser --> Web server --> Mail server --> Recipient` – lofihelsinki Sep 03 '18 at 14:49