Sending two email using javascript and mail-gun












0















I have created account on mail-gun website then I have email and password to add in javascript code to be able to send receive email when someone fill the form and submitted but I'm the only who is receiving email and I want to send thanks email to someone who submitted from the form.



Email.send("from@you.com",
"to@them.com",
"This is a subject",
"this is the body",
"smtp.yourisp.com",
"username",
"password");









share|improve this question

























  • You might want to look in the mailgun interface and see in the logs if the e-mails are being rejected there. If you see no mention of your friends e-mail addresses there, then the problem might lie in your code.

    – André C. Andersen
    Nov 14 '18 at 21:13
















0















I have created account on mail-gun website then I have email and password to add in javascript code to be able to send receive email when someone fill the form and submitted but I'm the only who is receiving email and I want to send thanks email to someone who submitted from the form.



Email.send("from@you.com",
"to@them.com",
"This is a subject",
"this is the body",
"smtp.yourisp.com",
"username",
"password");









share|improve this question

























  • You might want to look in the mailgun interface and see in the logs if the e-mails are being rejected there. If you see no mention of your friends e-mail addresses there, then the problem might lie in your code.

    – André C. Andersen
    Nov 14 '18 at 21:13














0












0








0








I have created account on mail-gun website then I have email and password to add in javascript code to be able to send receive email when someone fill the form and submitted but I'm the only who is receiving email and I want to send thanks email to someone who submitted from the form.



Email.send("from@you.com",
"to@them.com",
"This is a subject",
"this is the body",
"smtp.yourisp.com",
"username",
"password");









share|improve this question
















I have created account on mail-gun website then I have email and password to add in javascript code to be able to send receive email when someone fill the form and submitted but I'm the only who is receiving email and I want to send thanks email to someone who submitted from the form.



Email.send("from@you.com",
"to@them.com",
"This is a subject",
"this is the body",
"smtp.yourisp.com",
"username",
"password");






javascript html mailgun






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Nov 14 '18 at 13:17







Irasubiza Patrick

















asked Nov 14 '18 at 11:54









Irasubiza PatrickIrasubiza Patrick

92




92













  • You might want to look in the mailgun interface and see in the logs if the e-mails are being rejected there. If you see no mention of your friends e-mail addresses there, then the problem might lie in your code.

    – André C. Andersen
    Nov 14 '18 at 21:13



















  • You might want to look in the mailgun interface and see in the logs if the e-mails are being rejected there. If you see no mention of your friends e-mail addresses there, then the problem might lie in your code.

    – André C. Andersen
    Nov 14 '18 at 21:13

















You might want to look in the mailgun interface and see in the logs if the e-mails are being rejected there. If you see no mention of your friends e-mail addresses there, then the problem might lie in your code.

– André C. Andersen
Nov 14 '18 at 21:13





You might want to look in the mailgun interface and see in the logs if the e-mails are being rejected there. If you see no mention of your friends e-mail addresses there, then the problem might lie in your code.

– André C. Andersen
Nov 14 '18 at 21:13












1 Answer
1






active

oldest

votes


















-1














You need to send an email using JavaScript.

Here are steps.

first i recommend to use Mandrill

Step 1: Get an API key

Sign up here https://mandrill.com/signup/
then click on Get API Keys

Step 2: Load jQuery



<script src="//ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>


Step 3: Use the $.ajax function to send an email

Make sure you’re using POST to submit your data.



$.ajax({
type: “POST”,
url: “https://mandrillapp.com/api/1.0/messages/send.json”,
data: {
‘key’: ‘YOUR API KEY HERE’,
‘message’: {
‘from_email’: ‘YOUR@EMAIL.HERE’,
‘to’: [
{
‘email’: ‘RECIPIENT_NO_1@EMAIL.HERE’,
‘name’: ‘RECIPIENT NAME (OPTIONAL)’,
‘type’: ‘to’
},
{
‘email’: ‘RECIPIENT_NO_2@EMAIL.HERE’,
‘name’: ‘ANOTHER RECIPIENT NAME (OPTIONAL)’,
‘type’: ‘to’
}
],
‘autotext’: ‘true’,
‘subject’: ‘YOUR SUBJECT HERE!’,
‘html’: ‘YOUR EMAIL CONTENT HERE! YOU CAN USE HTML!’
}
}
}).done(function(response) {
console.log(response); // if you're into that sorta thing
});


Reference: https://medium.com/@mariusc23/send-an-email-using-only-javascript-b53319616782






share|improve this answer


























  • Can you summarize the solution you are proposing in the answer? Links have a tendency to die.

    – André C. Andersen
    Nov 14 '18 at 21:11











Your Answer






StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");

StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});

function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});


}
});














draft saved

draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53299675%2fsending-two-email-using-javascript-and-mail-gun%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown

























1 Answer
1






active

oldest

votes








1 Answer
1






active

oldest

votes









active

oldest

votes






active

oldest

votes









-1














You need to send an email using JavaScript.

Here are steps.

first i recommend to use Mandrill

Step 1: Get an API key

Sign up here https://mandrill.com/signup/
then click on Get API Keys

Step 2: Load jQuery



<script src="//ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>


Step 3: Use the $.ajax function to send an email

Make sure you’re using POST to submit your data.



$.ajax({
type: “POST”,
url: “https://mandrillapp.com/api/1.0/messages/send.json”,
data: {
‘key’: ‘YOUR API KEY HERE’,
‘message’: {
‘from_email’: ‘YOUR@EMAIL.HERE’,
‘to’: [
{
‘email’: ‘RECIPIENT_NO_1@EMAIL.HERE’,
‘name’: ‘RECIPIENT NAME (OPTIONAL)’,
‘type’: ‘to’
},
{
‘email’: ‘RECIPIENT_NO_2@EMAIL.HERE’,
‘name’: ‘ANOTHER RECIPIENT NAME (OPTIONAL)’,
‘type’: ‘to’
}
],
‘autotext’: ‘true’,
‘subject’: ‘YOUR SUBJECT HERE!’,
‘html’: ‘YOUR EMAIL CONTENT HERE! YOU CAN USE HTML!’
}
}
}).done(function(response) {
console.log(response); // if you're into that sorta thing
});


Reference: https://medium.com/@mariusc23/send-an-email-using-only-javascript-b53319616782






share|improve this answer


























  • Can you summarize the solution you are proposing in the answer? Links have a tendency to die.

    – André C. Andersen
    Nov 14 '18 at 21:11
















-1














You need to send an email using JavaScript.

Here are steps.

first i recommend to use Mandrill

Step 1: Get an API key

Sign up here https://mandrill.com/signup/
then click on Get API Keys

Step 2: Load jQuery



<script src="//ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>


Step 3: Use the $.ajax function to send an email

Make sure you’re using POST to submit your data.



$.ajax({
type: “POST”,
url: “https://mandrillapp.com/api/1.0/messages/send.json”,
data: {
‘key’: ‘YOUR API KEY HERE’,
‘message’: {
‘from_email’: ‘YOUR@EMAIL.HERE’,
‘to’: [
{
‘email’: ‘RECIPIENT_NO_1@EMAIL.HERE’,
‘name’: ‘RECIPIENT NAME (OPTIONAL)’,
‘type’: ‘to’
},
{
‘email’: ‘RECIPIENT_NO_2@EMAIL.HERE’,
‘name’: ‘ANOTHER RECIPIENT NAME (OPTIONAL)’,
‘type’: ‘to’
}
],
‘autotext’: ‘true’,
‘subject’: ‘YOUR SUBJECT HERE!’,
‘html’: ‘YOUR EMAIL CONTENT HERE! YOU CAN USE HTML!’
}
}
}).done(function(response) {
console.log(response); // if you're into that sorta thing
});


Reference: https://medium.com/@mariusc23/send-an-email-using-only-javascript-b53319616782






share|improve this answer


























  • Can you summarize the solution you are proposing in the answer? Links have a tendency to die.

    – André C. Andersen
    Nov 14 '18 at 21:11














-1












-1








-1







You need to send an email using JavaScript.

Here are steps.

first i recommend to use Mandrill

Step 1: Get an API key

Sign up here https://mandrill.com/signup/
then click on Get API Keys

Step 2: Load jQuery



<script src="//ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>


Step 3: Use the $.ajax function to send an email

Make sure you’re using POST to submit your data.



$.ajax({
type: “POST”,
url: “https://mandrillapp.com/api/1.0/messages/send.json”,
data: {
‘key’: ‘YOUR API KEY HERE’,
‘message’: {
‘from_email’: ‘YOUR@EMAIL.HERE’,
‘to’: [
{
‘email’: ‘RECIPIENT_NO_1@EMAIL.HERE’,
‘name’: ‘RECIPIENT NAME (OPTIONAL)’,
‘type’: ‘to’
},
{
‘email’: ‘RECIPIENT_NO_2@EMAIL.HERE’,
‘name’: ‘ANOTHER RECIPIENT NAME (OPTIONAL)’,
‘type’: ‘to’
}
],
‘autotext’: ‘true’,
‘subject’: ‘YOUR SUBJECT HERE!’,
‘html’: ‘YOUR EMAIL CONTENT HERE! YOU CAN USE HTML!’
}
}
}).done(function(response) {
console.log(response); // if you're into that sorta thing
});


Reference: https://medium.com/@mariusc23/send-an-email-using-only-javascript-b53319616782






share|improve this answer















You need to send an email using JavaScript.

Here are steps.

first i recommend to use Mandrill

Step 1: Get an API key

Sign up here https://mandrill.com/signup/
then click on Get API Keys

Step 2: Load jQuery



<script src="//ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>


Step 3: Use the $.ajax function to send an email

Make sure you’re using POST to submit your data.



$.ajax({
type: “POST”,
url: “https://mandrillapp.com/api/1.0/messages/send.json”,
data: {
‘key’: ‘YOUR API KEY HERE’,
‘message’: {
‘from_email’: ‘YOUR@EMAIL.HERE’,
‘to’: [
{
‘email’: ‘RECIPIENT_NO_1@EMAIL.HERE’,
‘name’: ‘RECIPIENT NAME (OPTIONAL)’,
‘type’: ‘to’
},
{
‘email’: ‘RECIPIENT_NO_2@EMAIL.HERE’,
‘name’: ‘ANOTHER RECIPIENT NAME (OPTIONAL)’,
‘type’: ‘to’
}
],
‘autotext’: ‘true’,
‘subject’: ‘YOUR SUBJECT HERE!’,
‘html’: ‘YOUR EMAIL CONTENT HERE! YOU CAN USE HTML!’
}
}
}).done(function(response) {
console.log(response); // if you're into that sorta thing
});


Reference: https://medium.com/@mariusc23/send-an-email-using-only-javascript-b53319616782







share|improve this answer














share|improve this answer



share|improve this answer








edited Nov 15 '18 at 7:05

























answered Nov 14 '18 at 21:07









kadibrakadibra

2619




2619













  • Can you summarize the solution you are proposing in the answer? Links have a tendency to die.

    – André C. Andersen
    Nov 14 '18 at 21:11



















  • Can you summarize the solution you are proposing in the answer? Links have a tendency to die.

    – André C. Andersen
    Nov 14 '18 at 21:11

















Can you summarize the solution you are proposing in the answer? Links have a tendency to die.

– André C. Andersen
Nov 14 '18 at 21:11





Can you summarize the solution you are proposing in the answer? Links have a tendency to die.

– André C. Andersen
Nov 14 '18 at 21:11


















draft saved

draft discarded




















































Thanks for contributing an answer to Stack Overflow!


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53299675%2fsending-two-email-using-javascript-and-mail-gun%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

Bressuire

Vorschmack

Quarantine