mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
net: implementation of SMTP RFC 2821 (#5807)
This commit is contained in:
18
vlib/net/smtp/smtp_test.v
Normal file
18
vlib/net/smtp/smtp_test.v
Normal file
@ -0,0 +1,18 @@
|
||||
import smtp
|
||||
|
||||
fn test_smtp() {
|
||||
|
||||
server := 'smtp.mailtrap.io'
|
||||
port := 2525
|
||||
username := '46d1daf3ff04f'
|
||||
password := '1e8ba2dbf19f4f'
|
||||
subject := 'Hello from V'
|
||||
from := 'dev@vlang.io'
|
||||
to := 'dev@vlang.io'
|
||||
msg := '<h1>Hi,from V module, this message was sent by SMTP!</h1>'
|
||||
body_type := 'html'
|
||||
debug := true //use while debugging
|
||||
|
||||
smtp.send_mail(server, port, username, password, subject, from, to, msg, body_type,
|
||||
debug)
|
||||
}
|
Reference in New Issue
Block a user