javascript - Nodemailer doesn't work from mobile phone -


i developed web app in nodejs submit form inputs , send them email. used nodemailer sending data email. here app.js code:

     var smtptransport = nodemailer.createtransport("smtp",{     service: "gmail",     auth: {         user: "email1@gmail.com",         pass: "password"     } });      app.get('/api', function(req, res) {          var mailoptions = {            from: 'email1@gmail.com',             to: 'email1@gmail.com',             subject: 'subjest',            text: 'test text'        };        console.log(mailoptions);         smtptransport.sendmail(mailoptions, function(error, response){          if(error){                 console.log(error);             res.end("error");          }else{                 console.log("message sent: " + response.message);             res.end("sent");              }          });     }); 

it work fine when submit form laptop/pc if submit mobile devices (i checked iphone), submit button redirects email account (which account default set in email app of device) query string this:

input1=testdata&input2=testdata&submit=submit 

any suggestion why form being submitted pc it's being redirected email account query string? in advance.

nodemailer version v0.7.1, node.js version v4.6.0

update:

in client side, i've <form action="mailto:email1@gmail.com"></form>; if delete action attribute, still can send email pc mobile device, time following error:

cannot post /abc.html 


Comments

Popular posts from this blog

aws api gateway - SerializationException in posting new Records via Dynamodb Proxy Service in API -

asp.net - Problems sending emails from forum -