Email sent with sendmail are going into spam [closed]

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP











up vote
-3
down vote

favorite












I get an issue using SENDMAIL on Ubuntu.



All emails are going into the SPAM folder. I'm using NodeJS and the Nodemailer module.



My code :



var transporter = nodemailer.createTransport(
sendmail: true,
newline: 'unix',
path: '/usr/sbin/sendmail'
);
transporter.sendMail(
from: "sameemail@gmail.com",
to: "sameemail@gmail.com",
subject: "test",
html: "test"
);









share|improve this question















closed as unclear what you're asking by Rui F Ribeiro, dr01, Kusalananda, msp9011, Anthony Geoghegan Aug 31 at 11:02


Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.














  • How is your email being sent? Directly from your server or via a smarthost? If you're sending specifically to Gmail are you using authentication?
    – roaima
    Aug 31 at 11:10














up vote
-3
down vote

favorite












I get an issue using SENDMAIL on Ubuntu.



All emails are going into the SPAM folder. I'm using NodeJS and the Nodemailer module.



My code :



var transporter = nodemailer.createTransport(
sendmail: true,
newline: 'unix',
path: '/usr/sbin/sendmail'
);
transporter.sendMail(
from: "sameemail@gmail.com",
to: "sameemail@gmail.com",
subject: "test",
html: "test"
);









share|improve this question















closed as unclear what you're asking by Rui F Ribeiro, dr01, Kusalananda, msp9011, Anthony Geoghegan Aug 31 at 11:02


Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.














  • How is your email being sent? Directly from your server or via a smarthost? If you're sending specifically to Gmail are you using authentication?
    – roaima
    Aug 31 at 11:10












up vote
-3
down vote

favorite









up vote
-3
down vote

favorite











I get an issue using SENDMAIL on Ubuntu.



All emails are going into the SPAM folder. I'm using NodeJS and the Nodemailer module.



My code :



var transporter = nodemailer.createTransport(
sendmail: true,
newline: 'unix',
path: '/usr/sbin/sendmail'
);
transporter.sendMail(
from: "sameemail@gmail.com",
to: "sameemail@gmail.com",
subject: "test",
html: "test"
);









share|improve this question















I get an issue using SENDMAIL on Ubuntu.



All emails are going into the SPAM folder. I'm using NodeJS and the Nodemailer module.



My code :



var transporter = nodemailer.createTransport(
sendmail: true,
newline: 'unix',
path: '/usr/sbin/sendmail'
);
transporter.sendMail(
from: "sameemail@gmail.com",
to: "sameemail@gmail.com",
subject: "test",
html: "test"
);






ubuntu






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Aug 31 at 17:48









Rui F Ribeiro

36.8k1272117




36.8k1272117










asked Aug 31 at 9:44









tonymx227

1246




1246




closed as unclear what you're asking by Rui F Ribeiro, dr01, Kusalananda, msp9011, Anthony Geoghegan Aug 31 at 11:02


Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.






closed as unclear what you're asking by Rui F Ribeiro, dr01, Kusalananda, msp9011, Anthony Geoghegan Aug 31 at 11:02


Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.













  • How is your email being sent? Directly from your server or via a smarthost? If you're sending specifically to Gmail are you using authentication?
    – roaima
    Aug 31 at 11:10
















  • How is your email being sent? Directly from your server or via a smarthost? If you're sending specifically to Gmail are you using authentication?
    – roaima
    Aug 31 at 11:10















How is your email being sent? Directly from your server or via a smarthost? If you're sending specifically to Gmail are you using authentication?
– roaima
Aug 31 at 11:10




How is your email being sent? Directly from your server or via a smarthost? If you're sending specifically to Gmail are you using authentication?
– roaima
Aug 31 at 11:10










2 Answers
2






active

oldest

votes

















up vote
4
down vote



accepted










If you're sending with a gmail address but not through gmail's mail system using proper authentication your mail will be considered a spoofing attempt by many mail servers. Best practices for sending mails from a program:



  • Only use sender addresses that you actually control.

  • Only send from a properly configured mail server (static ip, correct forward and reverse DNS) or use a smarthost.

Otherwise your mails are indistinguishable from typical spams sent via hacked servers using fake sender addresses, and you shouldn't be surprised that they are classified as spam.






share|improve this answer




















  • Ok thank you for you arguments.
    – tonymx227
    Aug 31 at 12:14

















up vote
-1
down vote













Use SMTP authorization.
(and check gmail settings - SMTP should be allowed)




If you are sending via sendmail with a gmail address - so letter will be sent from localhost -> recipient mail server is checking DKIM and SPF: failed,failed. -> So this letter 100% comes to spam.



If you are sending via SMTP - you pass thru through authorization with login and password. The letter is being sent from true gmail server.




The second way is more difficult. Configure SPF and DKIM records (make your 'localhost' as legal sender for gmail)



https://support.google.com/a/answer/33786?hl=en



https://support.google.com/a/answer/174124






share|improve this answer


















  • 1




    That wont probably solve the problem per se.
    – Rui F Ribeiro
    Aug 31 at 9:55










  • @Rui it might, but it depends on whether or not there's a smarthost and all sorts of things that the OP hasn't mentioned. Oleh, can you elaborate, please. Steps and an example would be great. At the moment your answer doesn't really solve the problem as described - it's just a vague pointer to a possible solution.
    – roaima
    Aug 31 at 11:07


















2 Answers
2






active

oldest

votes








2 Answers
2






active

oldest

votes









active

oldest

votes






active

oldest

votes








up vote
4
down vote



accepted










If you're sending with a gmail address but not through gmail's mail system using proper authentication your mail will be considered a spoofing attempt by many mail servers. Best practices for sending mails from a program:



  • Only use sender addresses that you actually control.

  • Only send from a properly configured mail server (static ip, correct forward and reverse DNS) or use a smarthost.

Otherwise your mails are indistinguishable from typical spams sent via hacked servers using fake sender addresses, and you shouldn't be surprised that they are classified as spam.






share|improve this answer




















  • Ok thank you for you arguments.
    – tonymx227
    Aug 31 at 12:14














up vote
4
down vote



accepted










If you're sending with a gmail address but not through gmail's mail system using proper authentication your mail will be considered a spoofing attempt by many mail servers. Best practices for sending mails from a program:



  • Only use sender addresses that you actually control.

  • Only send from a properly configured mail server (static ip, correct forward and reverse DNS) or use a smarthost.

Otherwise your mails are indistinguishable from typical spams sent via hacked servers using fake sender addresses, and you shouldn't be surprised that they are classified as spam.






share|improve this answer




















  • Ok thank you for you arguments.
    – tonymx227
    Aug 31 at 12:14












up vote
4
down vote



accepted







up vote
4
down vote



accepted






If you're sending with a gmail address but not through gmail's mail system using proper authentication your mail will be considered a spoofing attempt by many mail servers. Best practices for sending mails from a program:



  • Only use sender addresses that you actually control.

  • Only send from a properly configured mail server (static ip, correct forward and reverse DNS) or use a smarthost.

Otherwise your mails are indistinguishable from typical spams sent via hacked servers using fake sender addresses, and you shouldn't be surprised that they are classified as spam.






share|improve this answer












If you're sending with a gmail address but not through gmail's mail system using proper authentication your mail will be considered a spoofing attempt by many mail servers. Best practices for sending mails from a program:



  • Only use sender addresses that you actually control.

  • Only send from a properly configured mail server (static ip, correct forward and reverse DNS) or use a smarthost.

Otherwise your mails are indistinguishable from typical spams sent via hacked servers using fake sender addresses, and you shouldn't be surprised that they are classified as spam.







share|improve this answer












share|improve this answer



share|improve this answer










answered Aug 31 at 10:58









Hans-Martin Mosner

1,22548




1,22548











  • Ok thank you for you arguments.
    – tonymx227
    Aug 31 at 12:14
















  • Ok thank you for you arguments.
    – tonymx227
    Aug 31 at 12:14















Ok thank you for you arguments.
– tonymx227
Aug 31 at 12:14




Ok thank you for you arguments.
– tonymx227
Aug 31 at 12:14












up vote
-1
down vote













Use SMTP authorization.
(and check gmail settings - SMTP should be allowed)




If you are sending via sendmail with a gmail address - so letter will be sent from localhost -> recipient mail server is checking DKIM and SPF: failed,failed. -> So this letter 100% comes to spam.



If you are sending via SMTP - you pass thru through authorization with login and password. The letter is being sent from true gmail server.




The second way is more difficult. Configure SPF and DKIM records (make your 'localhost' as legal sender for gmail)



https://support.google.com/a/answer/33786?hl=en



https://support.google.com/a/answer/174124






share|improve this answer


















  • 1




    That wont probably solve the problem per se.
    – Rui F Ribeiro
    Aug 31 at 9:55










  • @Rui it might, but it depends on whether or not there's a smarthost and all sorts of things that the OP hasn't mentioned. Oleh, can you elaborate, please. Steps and an example would be great. At the moment your answer doesn't really solve the problem as described - it's just a vague pointer to a possible solution.
    – roaima
    Aug 31 at 11:07















up vote
-1
down vote













Use SMTP authorization.
(and check gmail settings - SMTP should be allowed)




If you are sending via sendmail with a gmail address - so letter will be sent from localhost -> recipient mail server is checking DKIM and SPF: failed,failed. -> So this letter 100% comes to spam.



If you are sending via SMTP - you pass thru through authorization with login and password. The letter is being sent from true gmail server.




The second way is more difficult. Configure SPF and DKIM records (make your 'localhost' as legal sender for gmail)



https://support.google.com/a/answer/33786?hl=en



https://support.google.com/a/answer/174124






share|improve this answer


















  • 1




    That wont probably solve the problem per se.
    – Rui F Ribeiro
    Aug 31 at 9:55










  • @Rui it might, but it depends on whether or not there's a smarthost and all sorts of things that the OP hasn't mentioned. Oleh, can you elaborate, please. Steps and an example would be great. At the moment your answer doesn't really solve the problem as described - it's just a vague pointer to a possible solution.
    – roaima
    Aug 31 at 11:07













up vote
-1
down vote










up vote
-1
down vote









Use SMTP authorization.
(and check gmail settings - SMTP should be allowed)




If you are sending via sendmail with a gmail address - so letter will be sent from localhost -> recipient mail server is checking DKIM and SPF: failed,failed. -> So this letter 100% comes to spam.



If you are sending via SMTP - you pass thru through authorization with login and password. The letter is being sent from true gmail server.




The second way is more difficult. Configure SPF and DKIM records (make your 'localhost' as legal sender for gmail)



https://support.google.com/a/answer/33786?hl=en



https://support.google.com/a/answer/174124






share|improve this answer














Use SMTP authorization.
(and check gmail settings - SMTP should be allowed)




If you are sending via sendmail with a gmail address - so letter will be sent from localhost -> recipient mail server is checking DKIM and SPF: failed,failed. -> So this letter 100% comes to spam.



If you are sending via SMTP - you pass thru through authorization with login and password. The letter is being sent from true gmail server.




The second way is more difficult. Configure SPF and DKIM records (make your 'localhost' as legal sender for gmail)



https://support.google.com/a/answer/33786?hl=en



https://support.google.com/a/answer/174124







share|improve this answer














share|improve this answer



share|improve this answer








edited Aug 31 at 11:47

























answered Aug 31 at 9:52









Oleh Vasylyev

993




993







  • 1




    That wont probably solve the problem per se.
    – Rui F Ribeiro
    Aug 31 at 9:55










  • @Rui it might, but it depends on whether or not there's a smarthost and all sorts of things that the OP hasn't mentioned. Oleh, can you elaborate, please. Steps and an example would be great. At the moment your answer doesn't really solve the problem as described - it's just a vague pointer to a possible solution.
    – roaima
    Aug 31 at 11:07













  • 1




    That wont probably solve the problem per se.
    – Rui F Ribeiro
    Aug 31 at 9:55










  • @Rui it might, but it depends on whether or not there's a smarthost and all sorts of things that the OP hasn't mentioned. Oleh, can you elaborate, please. Steps and an example would be great. At the moment your answer doesn't really solve the problem as described - it's just a vague pointer to a possible solution.
    – roaima
    Aug 31 at 11:07








1




1




That wont probably solve the problem per se.
– Rui F Ribeiro
Aug 31 at 9:55




That wont probably solve the problem per se.
– Rui F Ribeiro
Aug 31 at 9:55












@Rui it might, but it depends on whether or not there's a smarthost and all sorts of things that the OP hasn't mentioned. Oleh, can you elaborate, please. Steps and an example would be great. At the moment your answer doesn't really solve the problem as described - it's just a vague pointer to a possible solution.
– roaima
Aug 31 at 11:07





@Rui it might, but it depends on whether or not there's a smarthost and all sorts of things that the OP hasn't mentioned. Oleh, can you elaborate, please. Steps and an example would be great. At the moment your answer doesn't really solve the problem as described - it's just a vague pointer to a possible solution.
– roaima
Aug 31 at 11:07



Popular posts from this blog

How to check contact read email or not when send email to Individual?

Bahrain

Postfix configuration issue with fips on centos 7; mailgun relay