Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

365
Views
nodemailer doesn't working just on mobile phone. why?

I developing my website. i have sending mail function in contact tab and i do that with nodemailer. i published my site but i can not send mail from mobile phone while i can send mail with on pc browsers.

here is my nodemailer's code.

const express = require('express');
const bodyParser = require('body-parser');
const nodemailer = require('nodemailer');
const cors = require('cors');
const { response } = require('express');

const app = express();

app.use(bodyParser.json());
app.use(bodyParser.urlencoded({extended: true}));
app.use(cors());

app.get('/', ()=> {

    resizeBy.send('welcome to my form')

})    
app.post('/api/form', (req, res)=>{
    let data = req.body
    let smtpTransport = nodemailer.createTransport({
        service: 'gmail',
        port:465,
        auth:{
            user:"xxxxxx@gmail.com",
            pass:'xxxxxx'
        }
    });    
    let mailOptions={
        from:data.email,
        to:'xxxxxxxx@gmail.com',
        subject:`from BLOG`,
        html:`
            <h3 style="text-decoration:underline;">Informations</h3>
            
            <p style="padding: 10px 10px">&nbsp; ${data.message}</p>
        `      
    };
    smtpTransport.sendMail(mailOptions, (error,response)=>{
        if(error){
            res.send(error)
        }
        else{
            res.send('Success')
        }
    })
    smtpTransport.close();
})

const PORT = process.env.PORT||3001;

app.listen(PORT,()=>{
    console.log(`Server starting at port ${PORT}`);

})
about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!