aboutsummaryrefslogtreecommitdiff
path: root/doc/smtp.html
diff options
context:
space:
mode:
authorDiego Nehab <diego@tecgraf.puc-rio.br>2004-06-20 22:19:54 +0000
committerDiego Nehab <diego@tecgraf.puc-rio.br>2004-06-20 22:19:54 +0000
commitf7579db9e830ef41f422a280d26c9077f48728e5 (patch)
treed96affac7f5e8203d2e9c4a053213a992cd76650 /doc/smtp.html
parent5dc5c3ebe8f111bba01762ca0f5edba912c4f0b9 (diff)
downloadluasocket-f7579db9e830ef41f422a280d26c9077f48728e5.tar.gz
luasocket-f7579db9e830ef41f422a280d26c9077f48728e5.tar.bz2
luasocket-f7579db9e830ef41f422a280d26c9077f48728e5.zip
Fixing bugs...
Diffstat (limited to 'doc/smtp.html')
-rw-r--r--doc/smtp.html28
1 files changed, 14 insertions, 14 deletions
diff --git a/doc/smtp.html b/doc/smtp.html
index 89f4757..224dde3 100644
--- a/doc/smtp.html
+++ b/doc/smtp.html
@@ -16,7 +16,7 @@
16<center> 16<center>
17<table summary="LuaSocket logo"> 17<table summary="LuaSocket logo">
18<tr><td align=center><a href="http://www.lua.org"> 18<tr><td align=center><a href="http://www.lua.org">
19<img border=0 alt="LuaSocket" src="luasocket.png"> 19<img width=128 border=0 alt="LuaSocket" src="luasocket.png">
20</a></td></tr> 20</a></td></tr>
21<tr><td align=center valign=top>Network support for the Lua language 21<tr><td align=center valign=top>Network support for the Lua language
22</td></tr> 22</td></tr>
@@ -165,7 +165,7 @@ If successful, the function returns 1. Otherwise, the function returns
165<p class=note> 165<p class=note>
166Note: SMTP servers are can be very picky with the format of e-mail 166Note: SMTP servers are can be very picky with the format of e-mail
167addresses. To be safe, use only addresses of the form 167addresses. To be safe, use only addresses of the form
168"<tt>&lt;fulano@tecgraf.puc-rio.br&gt;</tt>" in the <tt>from</tt> and 168"<tt>&lt;fulano@example.com&gt;</tt>" in the <tt>from</tt> and
169<tt>rcpt</tt> arguments to the <tt>send</tt> function. In headers, e-mail 169<tt>rcpt</tt> arguments to the <tt>send</tt> function. In headers, e-mail
170addresses can take whatever form you like. </p> 170addresses can take whatever form you like. </p>
171 171
@@ -238,23 +238,23 @@ and
238local smtp = require("smtp") 238local smtp = require("smtp")
239 239
240-- Connects to server "localhost" and sends a message to users 240-- Connects to server "localhost" and sends a message to users
241-- "fulano@tecgraf.puc-rio.br", "beltrano@tecgraf.puc-rio.br", 241-- "fulano@example.com", "beltrano@example.com",
242-- and "sicrano@tecgraf.puc-rio.br". 242-- and "sicrano@example.com".
243-- Note that "fulano" is the primary recipient, "beltrano" receives a 243-- Note that "fulano" is the primary recipient, "beltrano" receives a
244-- carbon copy and neither of them knows that "sicrano" received a blind 244-- carbon copy and neither of them knows that "sicrano" received a blind
245-- carbon copy of the message. 245-- carbon copy of the message.
246from = "&lt;luasocket@tecgraf.puc-rio.br&gt;" 246from = "&lt;luasocket@example.com&gt;"
247 247
248rcpt = { 248rcpt = {
249 "&lt;fulano@tecgraf.puc-rio.br&gt;", 249 "&lt;fulano@example.com&gt;",
250 "&lt;beltrano@tecgraf.puc-rio.br&gt;", 250 "&lt;beltrano@example.com&gt;",
251 "&lt;sicrano@tecgraf.puc-rio.br&gt;" 251 "&lt;sicrano@example.com&gt;"
252} 252}
253 253
254mesgt = { 254mesgt = {
255 headers = { 255 headers = {
256 to = "Fulano da Silva &lt;fulano@tecgraf.puc-rio.br&gt;", 256 to = "Fulano da Silva &lt;fulano@example.com&gt;",
257 cc = '"Beltrano F. Nunes" &lt;beltrano@tecgraf.puc-rio.br&gt;', 257 cc = '"Beltrano F. Nunes" &lt;beltrano@example.com&gt;',
258 subject = "My first message" 258 subject = "My first message"
259 } 259 }
260 body = "I hope this works. If it does, I can send you another 1000 copies." 260 body = "I hope this works. If it does, I can send you another 1000 copies."
@@ -334,8 +334,8 @@ local ltn12 = require("ltn12")
334source = smtp.message{ 334source = smtp.message{
335 headers = { 335 headers = {
336 -- Remember that headers are *ignored* by smtp.send. 336 -- Remember that headers are *ignored* by smtp.send.
337 from = "Sicrano de Oliveira &lt;sicrano@tecgraf.puc-rio.br&gt;", 337 from = "Sicrano de Oliveira &lt;sicrano@example.com&gt;",
338 to = "Fulano da Silva &lt;fulano@tecgraf.puc-rio.br&gt;", 338 to = "Fulano da Silva &lt;fulano@example.com&gt;",
339 subject = "Here is a message with attachments" 339 subject = "Here is a message with attachments"
340 }, 340 },
341 body = { 341 body = {
@@ -378,8 +378,8 @@ source = smtp.message{
378 378
379-- finally send it 379-- finally send it
380r, e = smtp.send{ 380r, e = smtp.send{
381 from = "&lt;sicrano@tecgraf.puc-rio.br&gt;", 381 from = "&lt;sicrano@example.com&gt;",
382 rcpt = "&lt;fulano@tecgraf.puc-rio.br&gt;", 382 rcpt = "&lt;fulano@example.com&gt;",
383 source = source, 383 source = source,
384} 384}
385</pre> 385</pre>