| |

VerySource

 Forgot password?
 Register
Search
View: 733|Reply: 3

2 questions about sending attachments in jmail

[Copy link]

1

Threads

1

Posts

2.00

Credits

Newbie

Rank: 1

Credits
2.00

 China

Post time: 2020-3-22 20:00:01
| Show all posts |Read mode
strLink = "http: //localhost/prj/login.aspx? address =" + strId + "&" + "Status =" + strStatusId + "&" + "Number =" + strNumber + "&" + "ProNumber = "+ strJobNumber +"&"+" Methtype = "+ strMethType +"&"+" Meth = "+ strMeth
        strLink = "<a href=" + strLink + ">" + strLink + "</a>"
        JMail = Server.CreateObject ("JMail.SMTPMail")
        JMail.Logging = True
        JMail.ContentType = "text / html"
        JMail.ServerAddress = "172.X.X.X"
        JMail.Sender = "aa@xx.com"
        JMail.Subject = "Project Design ---" + strJobNumber
        JMail.Body = strLink
         JMail.AddAttachment ("C:\1.txt")
        JMail.AddRecipient ("xx@xx.com")


There are currently 2 questions
1 To send an attachment, is it necessary to have the attachment on the server. Is it necessary to upload to the server and then send it.
2 After sending this order, I found that if there is JMail.ContentType = "text / html"
, My attachment will appear in the body. And it is garbled, but without this sentence, my address link in the text will be useless.
How can i solve it
Reply

Use magic Report

3

Threads

26

Posts

13.00

Credits

Newbie

Rank: 1

Credits
13.00

 China

Post time: 2020-8-7 09:30:01
| Show all posts
My attachment will appear in the body. And it's garbled

--------------------
Mine too
Reply

Use magic Report

0

Threads

2

Posts

3.00

Credits

Newbie

Rank: 1

Credits
3.00

 China

Post time: 2020-8-13 13:30:01
| Show all posts
Remember to upload on a server

Do not include JMail.ContentType = "text/html" when sending attachments
Reply

Use magic Report

0

Threads

1

Posts

2.00

Credits

Newbie

Rank: 1

Credits
2.00

 China

Post time: 2020-8-14 07:00:01
| Show all posts
Must be uploaded to the server, this is for sure
Also remember to set the code as follows
jmail.Encoding="base64";
jmail.ContentType="multipart/related";
Reply

Use magic Report

You have to log in before you can reply Login | Register

Points Rules

Contact us|Archive|Mobile|CopyRight © 2008-2023|verysource.com ( 京ICP备17048824号-1 )

Quick Reply To Top Return to the list