Sending HTML in Email
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 385
- Forks
- 60
- PR merge metrics
- No merged PRs in 30d
Description
Hi,
I am trying to send Html in an Email through the following source code:
var email = require("./mailer/lib/node_mailer");
email.send({
host : "smtp.xyz.com", // smtp server hostname
port : "25", // smtp server port
ssl: false, // for SSL support - REQUIRES NODE v0.3.x OR HIGHER
domain : "xyz.com", // domain used by client to identify itself to server
to : "user@abc.com",
from : "info@xyz.com",
subject : "Hello World",
body: "
Hello! This is a test of the node_mailer.
",
authentication : "login", // auth login is supported; anything else is no auth
username : "info@lfn.com", // username
password : "Pornichet", // password
debug : true,
html : true
},
function(err, result){
if(err){ console.log(err); }
});
On executing the script, i get the following error message:
Object true has no method 'replace'
at Object.encodeQuotedPrintable (/home/devrelay/DeployedVersion/MailPrototype/mailer/node_modules/nodemailer/node_modules/mimelib-noiconv/mime-functions.js:151:15)
at EmailMessage.generateBody (/home/devrelay/DeployedVersion/MailPrototype/mailer/node_modules/nodemailer/lib/mail.js:336:27)
at SMTPClient._flushMessages (/home/devrelay/DeployedVersion/MailPrototype/mailer/node_modules/nodemailer/lib/smtp.js:157:21)
at SMTPClient.sendMail (/home/devrelay/DeployedVersion/MailPrototype/mailer/node_modules/nodemailer/lib/smtp.js:254:46)
at SMTPClientPool.send (/home/devrelay/DeployedVersion/MailPrototype/mailer/lib/node_mailer.js:71:10)
at dispatchMail (/home/devrelay/DeployedVersion/MailPrototype/mailer/lib/node_mailer.js:112:12)
at Object.node_mail [as send](/home/devrelay/DeployedVersion/MailPrototype/mailer/lib/node_mailer.js:159:5)
at Object. (/home/devrelay/DeployedVersion/MailPrototype/mailsender.js:3:11)
at Module._compile (module.js:402:26)
at Object..js (module.js:408:10)
How do i solve this ?
Thanks
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with mailsender.js and trace the send call through mailer/lib/node_mailer.js into the nodemailer stack locations shown in the error. Reproduce the supplied HTML email and inspect where the boolean value reaches encodeQuotedPrintable; done means the example sends without the reported replace error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, node.js
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100