mirror of
https://github.com/ChronosX88/psyced.git
synced 2024-11-09 20:11:00 +00:00
smtp_sendmsg()
This commit is contained in:
parent
4084c8312b
commit
69c1a1e2f5
@ -621,6 +621,21 @@ int greater_user(object a, object b) { return file_name(a) > file_name(b); }
|
||||
object* sorted_users() { return sort_array(users(), #'greater_user; }
|
||||
#endif
|
||||
|
||||
volatile mixed mailer;
|
||||
|
||||
// simple SMTP interface.. used from person:logAppend - why target?
|
||||
// assumes that mailto: rcpt has already been checked with legal_mailto() !
|
||||
int smtp_sendmsg(string target, string method, string data,
|
||||
mapping vars, string source, string rcpt, string loginurl) {
|
||||
#ifdef SMTP_PATH
|
||||
unless (mailer) mailer = SMTP_PATH "outgoing" -> load();
|
||||
return mailer -> enqueue(target, method, data, vars, source, rcpt,
|
||||
loginurl);
|
||||
#else
|
||||
return 0;
|
||||
#endif
|
||||
}
|
||||
|
||||
int xmpp_sendmsg(mixed target, string mc, mixed data, mapping vars,
|
||||
mixed source, array(mixed) u, int showingLog, string otarget) {
|
||||
string tmp;
|
||||
|
@ -86,8 +86,11 @@ reset(a) {
|
||||
}
|
||||
|
||||
create() {
|
||||
#ifdef DEFAULT_LAYOUT
|
||||
sTextPath (DEFAULT_LAYOUT, DEFLANG, "smtp");
|
||||
|
||||
#else
|
||||
sTextPath (0, 0, "smtp");
|
||||
#endif
|
||||
unless (spool) {
|
||||
restore_object(SPOOL_FILE);
|
||||
if (file_format != FILE_FORMAT) spool = 0;
|
||||
@ -337,9 +340,11 @@ rendermsg(rcpt) {
|
||||
if (o) m += w("_warning_omitted_messages",
|
||||
"[_amount_messages_omitted] messages omitted.",
|
||||
([ "_amount_messages_omitted" : o ]) );
|
||||
#ifndef _flag_disable_mail_signature
|
||||
#ifdef DEFAULT_URL_LOGIN
|
||||
# ifndef _flag_disable_mail_signature
|
||||
m += "\n--\n"+ w( "_info_mail_signature", "Reply by E-Mail is not possible. Please log in:\n[_URL_login]",
|
||||
([ "_URL_login": (t2 || DEFAULT_URL_LOGIN) ]) ) + "\n";
|
||||
# endif
|
||||
#endif
|
||||
t2 = "Content-Type: text/plain; charset=" SYSTEM_CHARSET "\n"
|
||||
#ifndef SEND_FIRST_MSG_AS_SUBJECT
|
||||
|
Loading…
Reference in New Issue
Block a user