Camel.InternetAddress¶
| Subclasses: | None | 
|---|
Methods¶
| Inherited: | Camel.Address (10), GObject.Object (37) | 
|---|---|
| Structs: | GObject.ObjectClass (5) | 
| class | encode_address(len, name, addr) | 
| class | format_address(name, addr) | 
| class | new() | 
| add(name, address) | |
| ensure_ascii_domains() | |
| find_address(address) | |
| find_name(name) | |
| get(index) | 
Virtual Methods¶
| Inherited: | Camel.Address (7), GObject.Object (7) | 
|---|
Properties¶
None
Signals¶
| Inherited: | GObject.Object (1) | 
|---|
Class Details¶
- 
class Camel.InternetAddress(**kwargs)¶
- Bases: - Camel.Address- Abstract: - No - Structure: - Camel.InternetAddressClass- 
classmethod encode_address(len, name, addr)¶
- Parameters: - Returns: - the encoded address - Return type: - Encode a single address ready for internet usage. Header folding as per rfc822 is also performed, based on the length len. If len is - None, then no folding will occur.- Note: The value at in will be updated based on any linewrapping done 
 - 
classmethod format_address(name, addr)¶
- Parameters: - Returns: - a nicely formatted string containing the rfc822 address - Return type: - Function to format a single address, suitable for display. 
 - 
classmethod new()¶
- Returns: - a new - Camel.InternetAddressobject- Return type: - Camel.InternetAddress- Create a new - Camel.InternetAddressobject.
 - 
add(name, address)¶
- Parameters: - Returns: - the index of added entry - Return type: - Add a new internet address to self. 
 - 
ensure_ascii_domains()¶
- Ensures that all email address’ domains will be ASCII encoded, which means that any non-ASCII letters will be properly encoded. This includes IDN (Internationalized Domain Names). - New in version 3.16. 
 - 
find_address(address)¶
- Parameters: - address ( - str) – address to lookup- Returns: - the index of the address, or -1 if not found - namep: - holder for the matching name, or - None, if not required.- Return type: - ( - int, namep:- stror- None)- Find an address by address. 
 - 
find_name(name)¶
- Parameters: - name ( - str) – name to lookup- Returns: - the index of the address matching the name, or -1 if no match was found - addressp: - holder for address - Camel.part, or- None, if not required.- Return type: - ( - int, addressp:- stror- None)- Find address by real name. 
 - 
get(index)¶
- Parameters: - index ( - int) – address’s array index- Returns: - Trueif such an address exists, or- Falseotherwise- namep: - holder for the returned name, or - None, if not required.- addressp: - holder for the returned address, or - None, if not required.- Return type: - ( - bool, namep:- stror- None, addressp:- stror- None)- Get the address at index. 
 
- 
classmethod