Defines the SMFEmailAddress_T data type and functions for E-Mail address handling.
More...
#include <cmime.h>
#include "smf_lookup.h"
Go to the source code of this file.
Defines the SMFEmailAddress_T data type and functions for E-Mail address handling.
A SMFEmailAddress_T consists of three parts:
To create a new SMFEmailAddress_T, use smf_email_address_new()
To destroy a SMFEmailAddress_T use smf_email_address_free()
It's possible to parse a string with smf_email_address_parse_string() and create a new SMFEmailAddress_T. To get a string from a SMFEmailAddress_T, use smf_email_address_to_string().
Possible types of email addresses.
Enumerator |
---|
SMF_EMAIL_ADDRESS_TYPE_TO |
message recipient
|
SMF_EMAIL_ADDRESS_TYPE_CC |
message cc recipient
|
SMF_EMAIL_ADDRESS_TYPE_BCC |
nessage bcc recipient
|
SMF_EMAIL_ADDRESS_TYPE_FROM |
message sender
|
Free a SMFEmailAddress_T object.
- Parameters
-
ea | a SMFEmailAddress_T object |
Get the email address of a SMFEmailAddress_T object.
- Parameters
-
ea | a SMFEmailAddress_T object |
- Returns
- the email address of a SMFEmailAddress_T object
Get the display name of a SMFEmailAddress_T object.
- Parameters
-
ea | a SMFEmailAddress_T object |
- Returns
- the display name of a SMFEmailAddress_T object
Creates a simplified address-instance.
The function can be used to extract the email from the angle-addr format.
- Parameters
-
ea | The SMFEmailAddress_T-instance to clone |
- Returns
- The simplified version of ea
Get the address type of SMFEmailAddress_T object.
- Parameters
-
ea | SMFEmailAddress_T object |
- Returns
- a SMFEmailAddressType_T object
Tests whether the email-part is empty.
The function pays attention to the angle-addr format.
- Parameters
-
ea | The email-instance to check |
- Returns
- When the email-address is emty true is returned
Creates a new SMFEmailAddress_T object.
- Returns
- an empty SMFEmailAddress_T object
Parse given string and create SMFEmailAddress_T object.
- Parameters
-
- Returns
- a newly allocated SMFEmailAddress_T object, or NULL on failure
Set the email address of SMFEmailAddress_T object.
- Parameters
-
ea | SMFEmailAddress_T pointer |
email | email address |
Set the display name of SMFEmailAddress_T object.
- Parameters
-
ea | SMFEmailAddress_T pointer |
name | the display name for the address |
Set the address type of SMFEmailAddress_T object.
- Parameters
-
ea | SMFEmailAddress_T object |
t | SMFEmailAddressType_T type |
Allocates a string containing the contents of the SMFEmailAddress_T object.
- Parameters
-
ea | SMFEmailAddress_T object |
- Returns
- the SMFEmailAddress_T object as an newly allocated string in rfc822 format.