Created
July 8, 2015 13:51
-
-
Save rahul-desai3/238422d2e4426e1e580a to your computer and use it in GitHub Desktop.
Unable to send emails using Haraka
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var outbound = require('./outbound'); | |
var plugin = this; | |
var to = '[email protected]'; | |
var from = '[email protected]'; | |
var contents = [ | |
"From: [email protected]", | |
"To: [email protected]", | |
"MIME-Version: 1.0", | |
"Content-type: text/plain; charset=us-ascii", | |
"Subject: Some subject here", | |
"", | |
"Some email body here", | |
""].join("\n"); | |
var outnext = function (code, msg) { | |
switch (code) { | |
case DENY: plugin.logerror("Sending mail failed: " + msg); | |
break; | |
case OK: plugin.loginfo("mail sent"); | |
next(); | |
break; | |
default: plugin.logerror("Unrecognised return code from sending email: " + msg); | |
next(); | |
} | |
}; | |
outbound.send_email(from, to, contents, outnext); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment