Skip to content

Commit

Permalink
Merge pull request #61 from IBM-Swift/plain-text
Browse files Browse the repository at this point in the history
 Use 'text/plain' for plain text content
  • Loading branch information
quanvo87 authored Mar 27, 2018
2 parents d6e90c0 + 79109bb commit 780246c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Sources/SwiftSMTP/DataSender.swift
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ private extension String {
// rendered correctly.
var embedded: String {
var embeddedText = ""
embeddedText += "CONTENT-TYPE: text/html; charset=utf-8\(CRLF)"
embeddedText += "CONTENT-TYPE: text/plain; charset=utf-8\(CRLF)"
embeddedText += "CONTENT-TRANSFER-ENCODING: 7bit\(CRLF)"
embeddedText += "CONTENT-DISPOSITION: inline\(CRLF)"
embeddedText += "\(CRLF)\(self)\(CRLF)"
Expand Down
2 changes: 1 addition & 1 deletion Tests/SwiftSMTPTests/Constant.swift
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ let smtp = SMTP(hostname: hostname, email: email, password: password)
let from = User(name: "Dr. Light", email: email)
let to = User(name: "Megaman", email: email)
let to2 = User(name: "Roll", email: email)
let text = "Humans and robots living together in harmony and equality:<br><br>That was my ultimate wish."
let text = "Humans and robots living together in harmony and equality: That was my ultimate wish."
let html = "<html><img src=\"http://vignette2.wikia.nocookie.net/megaman/images/4/40/StH250RobotMasters.jpg/revision/latest?cb=20130711161323\"/></html>"
let imgFilePath = testsDir + "/x.png"
let data = "{\"key\": \"hello world\"}".data(using: .utf8)!
Expand Down

0 comments on commit 780246c

Please sign in to comment.