Sending file via email to MMS for AT&T - python

One can send messages to an AT&T customer via [10-digit-cell-numer]#txt.att.net from their email client. I tried to send a file to my iPhone using this method (specifically an audio file) to no avail. The message came through but the file attachment was not present.

It seems you can send MMS messages to #mms.att.net
That was easy.

Related

Python smtplib: Unable to send sms messages to phone

I am trying to send messages to my phone using the SMTP protocol. If I log into my Google Account (for which I've enabled less secure apps) I'm able to send a message to '5551234567#tmomail.net'. The subject and body of the email arrive on my phone as a text message.
However, when I try to do the same with Python's smtplib library, I don't get a message. Here's the code I'm using:
import smtplib
# Establish a secure session with gmail's outgoing SMTP server using your gmail account
server = smtplib.SMTP("smtp.gmail.com", 587)
server.starttls()
# the account that will send the emails
server.login('me#gmail.com', 'password')
# sendmail(from, to, msg)
server.sendmail('me#gmail.com', '5551234567#tmomail.net', 'hey there!')
Does anyone know what I can do to get the text message to come through from the smtplib? Any suggestions are very welcome!
Try to check the link below.
If seems like you for forgot
server.ehlo()
How to send an email with Gmail as provider using Python?
Please let us know if you see python message in SENT emails folder of Gmail Inbox.
If yes, try to find a differences between one you sent from browser and one you sent from python API.

Sending email using python script from an Azure server

Using a python script, I am trying to send an email.
The mail part of the script looks like -
import smtplib
sender = 'abc.xyz#company.com'
receiver = 'abc.xyz#company.com'
message = """From: From Person <abc.xyz#company.com>
To: To Person <abc.xyz#company.com>
Subject: Inbound Folder Check - Alert
Unchanged even after an hour, please check
"""
smtpObj = smtplib.SMTP('smtp.office365.com',587)
smtpObj.starttls()
smtpObj.login('def#company.onmicrosoft.com','Password')
smtpObj.sendmail(sender, receiver, message)
The error that I am getting is -
raise SMTPDataError(code, resp) smtplib.SMTPDataError: (554, b'5.2.0
STOREDRV.Submission.Exception:SendAsDeniedE
xception.MapiExceptionSendAsDenied; Failed to process message due to a
permanent exception with message Cannot submit message. ...,
20.52176:140FCC8414001010640 10000, 20.50032:140FCC848417101069010000, 0.35180:0A006586, 255.23226:6E010000,
255.27962:0A000000, 255.27962:0E000000, 255.31418:0A00EB87, 16.55847:69000000, 1
7.43559:0000000090010000000000000D00000000000000, 20.52176:140FCC84140010100A00F 736, 20.50032:140FCC84841710100A00F836, 0.35180:8C010000, 255.23226:40000730, 25
5.27962:32000000, 255.17082:DC040000, 0.27745:9A010000, 4.21921:DC040000, 255.27 962:FA000000, 255.1494:0A00070E, 0.37692:01000100, 0.44092:01000100, 0.41232:010 00100, 0.60208:01000100, 0.37136:01000100, 0.34608:01000100, 0.55056:01000100, 0 .42768:01000100, 0.56112:05000780, 0.52807:00000000, 4.33016:DC040000, 7.40748:0 10000000000010C00000000, 7.57132:000000000000000005000780, 1.63016:32000000, 4.3 9640:DC040000, 8.45434:EC5537826FAD8844ABBA433565F1D57205000780, 5.10786:0000000 031352E32302E313232382E3032303A564931505230314D42323939303A38616433323065392D646
338612D343530642D386265322D62646464616261333932613900602005000780,
255.1750:4B01 0000, 255.31418:0A004C82, 0.22753:50010000, 255.21817:DC040000, 4.60547:DC040000 , 0.21966:B4100000, 4.30158:DC040000 [Hostname=abc]')
Only help I got on the internet was from the page - https://support.microsoft.com/en-us/help/3132755/554-5-2-0-storedrv-deliver-exception-objectnotfoundexception-mapiexcep
And it seems to say clutter is enabled but the folder is not present in the mailbox and suggests to turn off the clutter option which didn’t help.
PS - This works from my local machine within my company network but it is something to do with running it from Azure server.
First of all, please follow the offical document How to set up a multifunction device or application to send email using Office 365 to make sure whether set up correctly.
Secondly, if you were using Azure VM to send mail via SMTP, you can refer to this document Understand outbound SMTP problems in Azure VMs to try to fix your issue.
Meanwhile, for coding, there are some resources that may helps.
Python: Send Email via Office 365
Send email on App Service using Office 365 (O365) in PHP
Sending email from an Azure App Service using an O365 SMTP server in C#
Or using some packages directly like python-o365: GitHub and PyPI.
Finally, there is a service named SendGrid which be used for email service. You can use it to send mail in your scenario on Azure, please refer to the offical tutorial to know How to Send Email Using SendGrid with Azure (C#). For Python, you can code via its REST API or sendgrid python library.

Send to Event Hub to a publisher using Qpid-Proton

From the following link, I found out that we can send data to publisher over AMQP protocol, https://github.com/ppatierno/azuresblite-examples. So, how to implement the same, i.e) Send to publisher(with & without token), using Qpid-proton python?
send to a publisher means sending the message to a path like :
/Publishers/
You can use it as address for publishing message.
Paolo.

How to send myself an email notification when a suds job is done?

I'm learning to use suds in a python script to send SQL queries to a database. I'd like to able to send myself an email when the query job is finished (it has a job ID so I'm able to check its status). How do I do that?
This is how you send an email via python just fill in the blanks and input it to your code:
import smtplib
content = ("Content to send")
mail = smtplib.SMTP('smtp.gmail.com',587)
mail.ehlo()
mail.starttls()
mail.login('your_email#gmail.com','123your_password')
mail.sendmail('your_email#gmail.com','destination_email#gmail.com',content)
mail.close()
print("Sent")
(you dont have to use gmail as most addresses will still work through the gmail smtp)
If email is not required, you can also send chat messages to yourself.
Two projects achieving this :
Nimrod, for Facebook Messenger : https://www.nimrod-messenger.io/
Telegram Middleman, for Telegram : https://github.com/n1try/telegram-middleman-bot
I just wrote a Python decorator for this purpose. You can realize it in one line.
https://github.com/Wenzhi-Ding/py_reminder
from py_reminder import monitor
#monitor('SQL Query of xxx')
def query(sql):
...send your query...
query()
Once this function finishes / or is caught an error, you will get an email notification with some brief information.

Capturing email reply messages in Python

I have a web application in Python that allows someone to post a message. When this occurs, my application will automatically dispatch an email to the other user, who is following the "conversation/post". The user receive the email and replies with a message such as "Ok".
I want capture this reply message to a post in my application. I see this in applications such as Assana. How I can do this? Does there exists a service or API I can use?
Any email sent from the user will go to the domain mail server. If you want to receive it in a POST request, you'll have to write a separate application that retrieves email messages from the mail server and then sends the ones you want in a HTTP request to your web server. You'll then have to run your application as a daemon/service, and have it periodically poll the server for new messages (or use IMAP IDLE)
You may want to use imaplib to retrieve the emails.
Developing a complete two-way bridge between a web page and email with conversation tracking will likely require knowledge about MTA and LDA administration

Categories

Resources