2 Commits

Author SHA1 Message Date
Jason Morley 3eaa80f5db Use LoggerAPI debug logging instead of print in DataSender (#140)
This gives users of Swift-SMTP more control over stdout output.
2025-04-02 19:23:19 -07:00
Danny Sung 0501eae561 Update CI (#127)
* Update CI

* Use USE_SWIFT_DEVELOPMENT_SNAPSHOT for development snapshot
2022-02-06 20:02:49 -08:00
2 changed files with 11 additions and 10 deletions
+8 -8
View File
@@ -11,21 +11,21 @@ branches:
# by .swift-version, unless SWIFT_SNAPSHOT is specified.
matrix:
include:
- os: linux
dist: xenial
sudo: required
services: docker
env: DOCKER_IMAGE=docker.kitura.net/kitura/swift-ci-ubuntu16.04:5.2.5 DOCKER_ENVIRONMENT="EMAIL PASSWORD"
- os: linux
dist: bionic
sudo: required
services: docker
env: DOCKER_IMAGE=docker.kitura.net/kitura/swift-ci-ubuntu18.04:5.4 DOCKER_ENVIRONMENT="EMAIL PASSWORD"
env: DOCKER_IMAGE=docker.kitura.net/kitura/swift-ci-ubuntu18.04:5.2.5 DOCKER_ENVIRONMENT="EMAIL PASSWORD"
- os: linux
dist: xenial
dist: focal
sudo: required
services: docker
env: DOCKER_IMAGE=docker.kitura.net/kitura/swift-ci-ubuntu18.04:latest SWIFT_SNAPSHOT=$SWIFT_DEVELOPMENT_SNAPSHOT DOCKER_ENVIRONMENT="EMAIL PASSWORD"
env: DOCKER_IMAGE=docker.kitura.net/kitura/swift-ci-ubuntu20.04:5.4 DOCKER_ENVIRONMENT="EMAIL PASSWORD"
- os: linux
dist: focal
sudo: required
services: docker
env: DOCKER_IMAGE=docker.kitura.net/kitura/swift-ci-ubuntu20.04:latest USE_SWIFT_DEVELOPMENT_SNAPSHOT=1 DOCKER_ENVIRONMENT="EMAIL PASSWORD"
- os: osx
osx_image: xcode12.2
sudo: required
+3 -2
View File
@@ -15,6 +15,7 @@
**/
import Foundation
import LoggerAPI
// Used to send the content of an email--headers, text, and attachments.
// Should only be invoked after sending the `DATA` command to the server.
@@ -200,13 +201,13 @@ extension DataSender {
private extension DataSender {
// Write `text` to the socket.
func send(_ text: String) throws {
print("SEND: \(text)")
Log.debug("SEND: \(text)")
try socket.write(text)
}
// Write `data` to the socket.
func send(_ data: Data) throws {
print("SEND: data \(data.count) bytes")
Log.debug("SEND: data \(data.count) bytes")
try socket.write(data)
}
}