Prepare and send an email. More...
#include <stdbool.h>
#include <stdint.h>
#include <stdio.h>
Go to the source code of this file.
Macros | |
#define | SEND_NO_FLAGS 0 |
No flags are set. More... | |
#define | SEND_REPLY (1 << 0) |
Reply to sender. More... | |
#define | SEND_GROUP_REPLY (1 << 1) |
Reply to all. More... | |
#define | SEND_LIST_REPLY (1 << 2) |
Reply to mailing list. More... | |
#define | SEND_FORWARD (1 << 3) |
Forward email. More... | |
#define | SEND_POSTPONED (1 << 4) |
Recall a postponed email. More... | |
#define | SEND_BATCH (1 << 5) |
Send email in batch mode (without user interaction) More... | |
#define | SEND_KEY (1 << 6) |
Mail a PGP public key. More... | |
#define | SEND_RESEND (1 << 7) |
Reply using the current email as a template. More... | |
#define | SEND_POSTPONED_FCC (1 << 8) |
Used by mutt_get_postponed() to signal that the Mutt-Fcc header field was present. More... | |
#define | SEND_NO_FREE_HEADER (1 << 9) |
Used by the -E flag. More... | |
#define | SEND_DRAFT_FILE (1 << 10) |
Used by the -H flag. More... | |
#define | SEND_TO_SENDER (1 << 11) |
Compose new email to sender. More... | |
#define | SEND_GROUP_CHAT_REPLY (1 << 12) |
Reply to all recipients preserving To/Cc. More... | |
#define | SEND_NEWS (1 << 13) |
Reply to a news article. More... | |
#define | SEND_REVIEW_TO (1 << 14) |
Allow the user to edit the To field. More... | |
Typedefs | |
typedef uint16_t | SendFlags |
Flags for mutt_send_message(), e.g. SEND_REPLY. More... | |
Functions | |
void | mutt_add_to_reference_headers (struct Envelope *env, struct Envelope *curenv, struct ConfigSubset *sub) |
Generate references for a reply email. More... | |
struct Address * | mutt_default_from (struct ConfigSubset *sub) |
Get a default 'from' Address. More... | |
int | mutt_edit_address (struct AddressList *al, const char *field, bool expand_aliases) |
Edit an email address. More... | |
void | mutt_encode_descriptions (struct Body *b, bool recurse, struct ConfigSubset *sub) |
RFC2047 encode the content-descriptions. More... | |
int | mutt_fetch_recips (struct Envelope *out, struct Envelope *in, SendFlags flags, struct ConfigSubset *sub) |
Generate recpients for a reply email. More... | |
void | mutt_fix_reply_recipients (struct Envelope *env, struct ConfigSubset *sub) |
Remove duplicate recipients. More... | |
void | mutt_forward_intro (struct Email *e, FILE *fp, struct ConfigSubset *sub) |
Add the "start of forwarded message" text. More... | |
void | mutt_forward_trailer (struct Email *e, FILE *fp, struct ConfigSubset *sub) |
Add a "end of forwarded message" text. More... | |
void | mutt_make_attribution_intro (struct Email *e, FILE *fp_out, struct ConfigSubset *sub) |
Add "on DATE, PERSON wrote" header. More... | |
void | mutt_make_attribution_trailer (struct Email *e, FILE *fp_out, struct ConfigSubset *sub) |
Add suffix to replied email text. More... | |
void | mutt_make_forward_subject (struct Envelope *env, struct Email *e, struct ConfigSubset *sub) |
Create a subject for a forwarded email. More... | |
void | mutt_make_misc_reply_headers (struct Envelope *env, struct Envelope *curenv, struct ConfigSubset *sub) |
Set subject for a reply. More... | |
int | mutt_resend_message (FILE *fp, struct Mailbox *m, struct Email *e_cur, struct ConfigSubset *sub) |
Resend an email. More... | |
int | mutt_send_message (SendFlags flags, struct Email *e_templ, const char *tempfile, struct Mailbox *m, struct EmailList *el, struct ConfigSubset *sub) |
Send an email. More... | |
void | mutt_set_followup_to (struct Envelope *env, struct ConfigSubset *sub) |
Set followup-to field. More... | |
bool | mutt_send_list_subscribe (struct Mailbox *m, struct Email *e) |
Send a mailing-list subscription email. More... | |
bool | mutt_send_list_unsubscribe (struct Mailbox *m, struct Email *e) |
Send a mailing-list unsubscription email. More... | |
Prepare and send an email.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/.
Definition in file send.h.
#define SEND_BATCH (1 << 5) |
#define SEND_RESEND (1 << 7) |
#define SEND_POSTPONED_FCC (1 << 8) |
Used by mutt_get_postponed() to signal that the Mutt-Fcc header field was present.
#define SEND_GROUP_CHAT_REPLY (1 << 12) |
#define SEND_REVIEW_TO (1 << 14) |
typedef uint16_t SendFlags |
Flags for mutt_send_message(), e.g. SEND_REPLY.
void mutt_add_to_reference_headers | ( | struct Envelope * | env, |
struct Envelope * | curenv, | ||
struct ConfigSubset * | sub | ||
) |
Generate references for a reply email.
Definition at line 1093 of file send.c.
struct Address * mutt_default_from | ( | struct ConfigSubset * | sub | ) |
Get a default 'from' Address.
ptr | Newly allocated Address |
Definition at line 1462 of file send.c.
int mutt_edit_address | ( | struct AddressList * | al, |
const char * | field, | ||
bool | expand_aliases | ||
) |
Edit an email address.
[in,out] | al | AddressList to edit |
[in] | field | Prompt for user |
[in] | expand_aliases | If true, expand Address aliases |
0 | Success |
-1 | Failure |
Definition at line 178 of file send.c.
void mutt_encode_descriptions | ( | struct Body * | b, |
bool | recurse, | ||
struct ConfigSubset * | sub | ||
) |
RFC2047 encode the content-descriptions.
b | Body of email |
recurse | If true, encode children parts |
sub | Config Subset |
Definition at line 1581 of file send.c.
int mutt_fetch_recips | ( | struct Envelope * | out, |
struct Envelope * | in, | ||
SendFlags | flags, | ||
struct ConfigSubset * | sub | ||
) |
Generate recpients for a reply email.
out | Envelope to populate |
in | Envelope of source email |
flags | Flags, see SendFlags |
sub | Config Subset |
0 | Success |
-1 | Failure |
Definition at line 928 of file send.c.
void mutt_fix_reply_recipients | ( | struct Envelope * | env, |
struct ConfigSubset * | sub | ||
) |
Remove duplicate recipients.
env | Envelope to fix |
sub | Config Subset |
Definition at line 1016 of file send.c.
void mutt_forward_intro | ( | struct Email * | e, |
FILE * | fp, | ||
struct ConfigSubset * | sub | ||
) |
Add the "start of forwarded message" text.
e | |
sub | Config Subset |
fp | File to write to |
Definition at line 449 of file send.c.
void mutt_forward_trailer | ( | struct Email * | e, |
FILE * | fp, | ||
struct ConfigSubset * | sub | ||
) |
Add a "end of forwarded message" text.
e | |
sub | Config Subset |
fp | File to write to |
Definition at line 472 of file send.c.
void mutt_make_attribution_intro | ( | struct Email * | e, |
FILE * | fp_out, | ||
struct ConfigSubset * | sub | ||
) |
Add "on DATE, PERSON wrote" header.
e | |
fp_out | File to write to |
sub | Config Subset |
Definition at line 656 of file send.c.
void mutt_make_attribution_trailer | ( | struct Email * | e, |
FILE * | fp_out, | ||
struct ConfigSubset * | sub | ||
) |
void mutt_make_forward_subject | ( | struct Envelope * | env, |
struct Email * | e, | ||
struct ConfigSubset * | sub | ||
) |
Create a subject for a forwarded email.
Definition at line 1046 of file send.c.
void mutt_make_misc_reply_headers | ( | struct Envelope * | env, |
struct Envelope * | curenv, | ||
struct ConfigSubset * | sub | ||
) |
Set subject for a reply.
Definition at line 1066 of file send.c.
int mutt_resend_message | ( | FILE * | fp, |
struct Mailbox * | m, | ||
struct Email * | e_cur, | ||
struct ConfigSubset * | sub | ||
) |
Resend an email.
0 | Message was successfully sent |
-1 | Message was aborted or an error occurred |
1 | Message was postponed |
Definition at line 1641 of file send.c.
int mutt_send_message | ( | SendFlags | flags, |
struct Email * | e_templ, | ||
const char * | tempfile, | ||
struct Mailbox * | m, | ||
struct EmailList * | el, | ||
struct ConfigSubset * | sub | ||
) |
Send an email.
flags | Send mode, see SendFlags |
e_templ | Template to use for new message |
tempfile | File specified by -i or -H |
m | Current mailbox |
el | List of Emails to send |
sub | Config Subset |
0 | Message was successfully sent |
-1 | Message was aborted or an error occurred |
1 | Message was postponed |
Definition at line 2129 of file send.c.
void mutt_set_followup_to | ( | struct Envelope * | env, |
struct ConfigSubset * | sub | ||
) |
Set followup-to field.
env | Envelope to modify |
sub | Config Subset |
Definition at line 1337 of file send.c.
Send a mailing-list subscription email.
true | Success |
false | Failure |
Definition at line 3041 of file send.c.
Send a mailing-list unsubscription email.
true | Success |
false | Failure |
Definition at line 3070 of file send.c.