Representation of an email header (envelope) More...
#include "config.h"
#include <stdbool.h>
#include <stddef.h>
#include <string.h>
#include "mutt/lib.h"
#include "address/lib.h"
#include "config/lib.h"
#include "core/lib.h"
#include "envelope.h"
#include "email.h"
Go to the source code of this file.
Macros | |
#define | MOVE_ELEM(member) |
#define | MOVE_STAILQ(member) |
#define | MOVE_ADDRESSLIST(member) |
#define | MOVE_BUFFER(member) |
#define | H_TO_INTL(member) |
Functions | |
struct Envelope * | mutt_env_new (void) |
Create a new Envelope. | |
void | mutt_env_set_subject (struct Envelope *env, const char *subj) |
Set both subject and real_subj to subj. | |
struct AutocryptHeader * | mutt_autocrypthdr_new (void) |
Create a new AutocryptHeader. | |
void | mutt_autocrypthdr_free (struct AutocryptHeader **ptr) |
Free an AutocryptHeader. | |
void | mutt_env_free (struct Envelope **ptr) |
Free an Envelope. | |
bool | mutt_env_notify_send (struct Email *e, enum NotifyEnvelope type) |
Send an Envelope change notification. | |
void | mutt_env_merge (struct Envelope *base, struct Envelope **extra) |
Merge the headers of two Envelopes. | |
bool | mutt_env_cmp_strict (const struct Envelope *e1, const struct Envelope *e2) |
Strictly compare two Envelopes. | |
void | mutt_env_to_local (struct Envelope *env) |
Convert an Envelope's Address fields to local format. | |
int | mutt_env_to_intl (struct Envelope *env, const char **tag, char **err) |
Convert an Envelope's Address fields to Punycode format. | |
Representation of an email header (envelope)
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 envelope.c.
#define MOVE_ELEM | ( | member | ) |
#define MOVE_STAILQ | ( | member | ) |
#define MOVE_ADDRESSLIST | ( | member | ) |
#define MOVE_BUFFER | ( | member | ) |
#define H_TO_INTL | ( | member | ) |
Definition at line 336 of file envelope.c.
struct Envelope * mutt_env_new | ( | void | ) |
Create a new Envelope.
ptr | New Envelope |
Definition at line 46 of file envelope.c.
void mutt_env_set_subject | ( | struct Envelope * | env, |
const char * | subj | ||
) |
Set both subject and real_subj to subj.
env | Envelope |
subj | Subject |
Definition at line 69 of file envelope.c.
struct AutocryptHeader * mutt_autocrypthdr_new | ( | void | ) |
Create a new AutocryptHeader.
ptr | New AutocryptHeader |
Definition at line 95 of file envelope.c.
void mutt_autocrypthdr_free | ( | struct AutocryptHeader ** | ptr | ) |
Free an AutocryptHeader.
ptr | AutocryptHeader to free |
Definition at line 104 of file envelope.c.
void mutt_env_free | ( | struct Envelope ** | ptr | ) |
Free an Envelope.
[out] | ptr | Envelope to free |
Definition at line 126 of file envelope.c.
bool mutt_env_notify_send | ( | struct Email * | e, |
enum NotifyEnvelope | type | ||
) |
Send an Envelope change notification.
e | |
type | Notification type, e.g. NT_ENVELOPE_SUBJECT |
true | Successfully sent |
Definition at line 179 of file envelope.c.
Merge the headers of two Envelopes.
Any fields that are missing from base will be copied from extra. extra will be freed afterwards.
Definition at line 193 of file envelope.c.
Strictly compare two Envelopes.
true | Envelopes are strictly identical |
Definition at line 285 of file envelope.c.
void mutt_env_to_local | ( | struct Envelope * | env | ) |
Convert an Envelope's Address fields to local format.
env | Envelope to modify |
Run mutt_addrlist_to_local() on each of the Address fields in the Envelope.
Definition at line 317 of file envelope.c.
int mutt_env_to_intl | ( | struct Envelope * | env, |
const char ** | tag, | ||
char ** | err | ||
) |
Convert an Envelope's Address fields to Punycode format.
[in] | env | Envelope to modify |
[out] | tag | Name of the failed field |
[out] | err | Failed address |
0 | Success, all addresses converted |
1 | Error, tag and err will be set |
Run mutt_addrlist_to_intl() on each of the Address fields in the Envelope.
Definition at line 355 of file envelope.c.