New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Problem with line break in "body:" #41
Comments
Hi, are you trying to set the linebreaks in your code like this?
This doesn't work since JavaScript doesn't support multi-line strings, you need to go with \n symbols.
|
Oh! :( Well, its a form to pass an html file like this: <!DOCTYPE html>
<html>
<head>
<style type="text/css">
body, p {
margin:0px;
padding: 0px;
}
</style>
</head>
<body>
<p>Olá! Isso é um teste!</p>
</body>
</html> and here to it: {
from: "sender@mail.ee",
to: "receiver@mail.ee",
subject: "test mail",
htmlFile: "myEmailMkt.html"
} Thanks! |
I don't think this is a Nodemailer issue. You should check the input from the file you are reading since Nodemailer doesn't touch line endings at all - it simply passes everything entered to to the server |
If you try to send a message with line breaks
"Hello!
How are you!?
Cheers!"
Occour an error!
The same message:
"Hello! \n\nHow are you!?\n\nCheers!"
Its ok!
Can you fix it!? Thanks!
The text was updated successfully, but these errors were encountered: