attachment

Which HTTP method to use for file downloading?

雨燕双飞 提交于 2020-12-05 02:33:08
问题 In my site users can download their files. But files are generated by using PHP. So what's HTTP method should I use for sending request for download as file attachment? GET or POST? 回答1: GET is for passively retrieving files, POST is for altering information on the server. This is as seen from the client, it doesn't matter what the server does or doesn't do in the process. So unless you're altering some server state in the request: GET. 回答2: GET From http://en.wikipedia.org/wiki/Hypertext

Can anyone tell my why I'm getting the error [AttributeError: 'list' object has no attribute 'encode']

拜拜、爱过 提交于 2020-08-22 09:57:10
问题 I keep trying to run this code in order to send an excel sheet as an attachment on an email. I can send normal emails using smtplib but can't get the MIMEMultipart to work. I keep getting the [AttributeError: 'list' object has no attribute 'encode'] error import smtplib, ssl from email.mime.multipart import MIMEMultipart from email.mime.base import MIMEBase from email.mime.text import MIMEText from email import encoders fromaddr = ['Email'] sendto = ['Email'] msg = MIMEMultipart() msg['From']

send a pic from excel via whatsapp

心已入冬 提交于 2020-08-05 09:37:17
问题 How can we send a pic from excel via whatsapp? I have found the vba code to send messages via https://web.whatsapp.com, Sub Test() Dim text As String Dim contact As String text = Range("C2").Value ActiveWorkbook.FollowHyperlink Address:=" https://web.whatsapp.com/" If MsgBox("Is WhatsApp Loaded?" & vbNewLine & vbNewLine & "Press No To Cancel", vbYesNo + vbQuestion + vbSystemModal, "WhatsApp") = vbYes Then Fazer (100) startrow = 2 startcol = 2 Do Until Sheets(1).Cells(startrow, 1) = "" contact

How to send email attachments with Python 3.6

懵懂的女人 提交于 2020-08-05 07:54:06
问题 would you mind helping me, please! I use all code's from this page How to send email attachments with Python but it didn't work =( This is last version which i used import smtplib from smtplib import SMTP_SSL from email.mime.multipart import MIMEMultipart from email.mime.base import MIMEBase from email.mime.text import MIMEText from email import encoders import os filepath = 'D:/files/1.jpg' fromaddr = "name@gmail.com" toaddr = "name2@gmail.com" password = '********' mail_adr = 'smtp.gmail