Send email: Difference between revisions
Content added Content deleted
SqrtNegInf (talk | contribs) m (→{{header|Perl}}: future-proof for 5.36) |
m (→{{header|Wren}}: Minor tidy) |
||
Line 1,906: | Line 1,906: | ||
{{libheader|WrenGo}} |
{{libheader|WrenGo}} |
||
An embedded application with a Go host so we can use their net/smtp module. |
An embedded application with a Go host so we can use their net/smtp module. |
||
<syntaxhighlight lang=" |
<syntaxhighlight lang="wren">/* Send_email.wren */ |
||
foreign class Authority { |
foreign class Authority { |
||
Line 2,004: | Line 2,004: | ||
<br> |
<br> |
||
We now embed this script in the following Go program and run it. |
We now embed this script in the following Go program and run it. |
||
<syntaxhighlight lang="go">/* go run |
<syntaxhighlight lang="go">/* go run Send_email.go */ |
||
package main |
package main |
||
Line 2,064: | Line 2,064: | ||
func main() { |
func main() { |
||
vm := wren.NewVM() |
vm := wren.NewVM() |
||
fileName := " |
fileName := "Send_email.wren" |
||
smtpMethodMap := wren.MethodMap { "static sendMail(_,_,_,_,_)": sendMail } |
smtpMethodMap := wren.MethodMap { "static sendMail(_,_,_,_,_)": sendMail } |