This shows you the differences between two versions of the page.
Last revision | |||
— | sdk:scripts:send-mail [2015/05/05 15:04] – external edit 127.0.0.1 | ||
---|---|---|---|
Line 1: | Line 1: | ||
+ | ====== SDK Script send-mail.are ====== | ||
+ | <code c send-mail.are> | ||
+ | /* DESC: This script will send an E-Mail to the specified address. | ||
+ | * Copyright (C) 2012 NetModule AG, Switzerland | ||
+ | */ | ||
+ | |||
+ | void usage () { | ||
+ | printf(" | ||
+ | exit(1); | ||
+ | } | ||
+ | |||
+ | if (argc != 4) { | ||
+ | usage(); | ||
+ | } | ||
+ | |||
+ | to = argv[1]; | ||
+ | subj = argv[2]; | ||
+ | msg = ""; | ||
+ | for (i = 3; i < argc; i++) { | ||
+ | msg = strcat(msg, " ", argv[i]); | ||
+ | } | ||
+ | |||
+ | ret = nb_email_send(to, | ||
+ | if (ret == 0) { | ||
+ | printf(" | ||
+ | } else { | ||
+ | printf(" | ||
+ | } | ||
+ | |||
+ | exit(0); | ||
+ | |||
+ | </ | ||