1.16. sms
¶
This module provides functionality for sending free SMS messages by emailing a carriers SMS gateway.
1.16.1. Data¶
1.16.2. Functions¶
-
get_smtp_servers
(domain)[source]¶ Get the SMTP servers for the specified domain by querying their MX records.
Parameters: domain (str) – The domain to look up the MX records for. Returns: The smtp servers for the specified domain. Return type: list
-
lookup_carrier_gateway
(carrier)[source]¶ Lookup the SMS gateway for the specified carrier. Normalization on the carrier name does take place and if an invalid or unknown value is specified, None will be returned.
Parameters: carrier (str) – The name of the carrier to lookup. Returns: The SMS gateway for the specified carrier. Return type: str
-
send_sms
(message_text, phone_number, carrier, from_address=None)[source]¶ Send an SMS message by emailing the carriers SMS gateway. This method requires no money however some networks are blocked by the carriers due to being flagged for spam which can cause issues.
Parameters: Returns: This returns the status of the sent message.
Return type: