Questions tagged [mimemultipart]
22 questions
2
votes
2 answers
Sending images through email
I have a function which send images to the email
The requirements is, i have only two images the first one i need to send as a attachments and another one in the body .
Using alternative in the MIMEmultipart it sending the both images as a documents…

Jerry Vfc
- 75
- 7
2
votes
1 answer
Pyhton3 - send email failing with - "OSError: [Errno 113] No route to host"
I've script written in Python3, it's doing couple of things and one of them is sending email. That's the code:
import smtplib
import os
import json
import re
from datetime import datetime
from smtplib import SMTP
from…

piooreq
- 57
- 1
- 3
2
votes
2 answers
How do I store Python dataframe in-memory and send it as excel attachment to specific email addresses?
I read my data from mongo dB and create a report. I used to save the report as a .xlsx file on my local machine and manually send it using email. I would like to automate this process.
I found a way in Python 3 to save the file in-memory using…

Amogh Katwe
- 87
- 5
1
vote
0 answers
How to process each part from multipart response in Java from javax.mail.internet.MimeMultipart API
ByteArrayDataSource datasource = new ByteArrayDataSource(in, "multipart/form-data");
MimeMultipart multipart = new MimeMultipart(datasource);
int count = multipart.getCount();
log.debug("count " + count);
for (int i = 0; i < count; i++) {
…

Sharath K
- 11
- 2
1
vote
0 answers
Python MIMEMultipart("related", policy=policy.HTTP) with incorrect line endings in octet-stream attachments?
for an activity with fastapi, I am preparing a Response object with the content of a email.mime.multipart MIMEMultipart object. Adhering to the standards (RFC), a MIMEMultipart response uses CRLF line endings (policy=HTTP). However, the binary…

Sophonet
- 11
- 1
1
vote
0 answers
Combine a plain string and HTML code using Python smtp library
I'm trying to combine a plain string and some HTML code to the same content of the Email message.
I wrote my code as follow:
from email.mime.text import MIMEText
import smtplib
from email.mime.multipart import MIMEMultipart
fromaddr =…
1
vote
1 answer
What is causing my 'test.txt' file being sent from Python to my gmail account to come across as "Untitled" when I receive it in my email inbox?
I am sending a file called test.txt as an attachment below through the python program. It successfully sends but when I receive it in my Gmail inbox the attached file says Untitled instead of text.txt. I have my email block of code below and it…

zeusbella
- 49
- 6
1
vote
1 answer
Python sending email with either plain text or html, but not both
I am experimenting with sending emails using Python. I have run into a problem where I cannot send plain text and html in the body, only one or the other. If I attach both parts, only the HTML shows up, and if I comment out the HTML part, then the…

Saar Koren
- 25
- 1
- 7
1
vote
1 answer
sending mail with multiple embedded images using MimeMultipart, Java 8
I'm trying to send mails with multiple images embedded into the body....
I was reding this Sending mail along with embedded image using javamail, but unfortunately I can't get works
Creating the Message
javax.mail.Message message = new…

joseluisbz
- 1,491
- 1
- 36
- 58
0
votes
0 answers
Python MimeMultipart() Emails Attaching MIMEText as attachment rather than HTML email body text
I've wrote some code below that queries MySQL, Puts it into a Dataframe using Pandas, Gets the Top 5 rows and then puts this information into an Email using MimeMultipart.
In my email from my dataframe from SQL i'm want it attaching as a CSV (this…

ZachtPy
- 1
- 1
0
votes
0 answers
MIMEMultipart ['From'] is not working, what is the problem?
I'm trying to send an email attachment using
MIMEMultipart ['From'] and it is not working, what is the problem?
When I run the code, it says this:
n send_email
msg['From'] = from_address
~~~^^^^^^^^ …
0
votes
0 answers
Parsing using cgi multipart/form-data request seems to be corrupting uploaded file in AWS Lambda
I am trying to implement a mailer API with Serverless Framework and AWS Lambda. Plan is to send the mail details and attachment in a multipart/form-data POST request and then read the file and append it as an attachment.
def handler(event,…

stark_1
- 53
- 6
0
votes
2 answers
email dataframe as table in mail body using python
I am working on a python project where I am needed to send a mail that contains some text and a dataframe. I need the dataframe to be added to the mail body as a table and not an attachment. The dataframe would not have more than 5-6 columns and…

FarzadAvari
- 39
- 7
0
votes
1 answer
Apache Camel 3.17 Adoptium JDK 17 Error IllegalAccessError: failed to access class registries.LogSupport from class javax.activation.MailcapCommandMap
`I have migrated Camel 3.20 to JDK 17 Adoptium.
When calling ".unmarshal().mimeMultipart()" at the beginning of the route, the following error occurs. I am slowly running out of ideas.
Stacktrace:
2023-03-21 10:18:24,915 [http-nio-8080-exec-303]…

seb tastic
- 1
- 1
0
votes
0 answers
HTML table to outlook via python
I need to send an HTML table to outlook via python I tried this code but it isn't working it send an empty mail to me
msg = MIMEMultipart()
msg['Subject'] = "subject"
msg['From'] = "from.com"
msg['To'] = ', '.join(email_list)
…

Hagar Mohamed
- 1
- 1