diff options
| author | Diego Nehab <diego@tecgraf.puc-rio.br> | 2004-06-20 22:19:54 +0000 |
|---|---|---|
| committer | Diego Nehab <diego@tecgraf.puc-rio.br> | 2004-06-20 22:19:54 +0000 |
| commit | f7579db9e830ef41f422a280d26c9077f48728e5 (patch) | |
| tree | d96affac7f5e8203d2e9c4a053213a992cd76650 /doc/smtp.html | |
| parent | 5dc5c3ebe8f111bba01762ca0f5edba912c4f0b9 (diff) | |
| download | luasocket-f7579db9e830ef41f422a280d26c9077f48728e5.tar.gz luasocket-f7579db9e830ef41f422a280d26c9077f48728e5.tar.bz2 luasocket-f7579db9e830ef41f422a280d26c9077f48728e5.zip | |
Fixing bugs...
Diffstat (limited to 'doc/smtp.html')
| -rw-r--r-- | doc/smtp.html | 28 |
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> |
| 166 | Note: SMTP servers are can be very picky with the format of e-mail | 166 | Note: SMTP servers are can be very picky with the format of e-mail |
| 167 | addresses. To be safe, use only addresses of the form | 167 | addresses. To be safe, use only addresses of the form |
| 168 | "<tt><fulano@tecgraf.puc-rio.br></tt>" in the <tt>from</tt> and | 168 | "<tt><fulano@example.com></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 |
| 170 | addresses can take whatever form you like. </p> | 170 | addresses can take whatever form you like. </p> |
| 171 | 171 | ||
| @@ -238,23 +238,23 @@ and | |||
| 238 | local smtp = require("smtp") | 238 | local 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. |
| 246 | from = "<luasocket@tecgraf.puc-rio.br>" | 246 | from = "<luasocket@example.com>" |
| 247 | 247 | ||
| 248 | rcpt = { | 248 | rcpt = { |
| 249 | "<fulano@tecgraf.puc-rio.br>", | 249 | "<fulano@example.com>", |
| 250 | "<beltrano@tecgraf.puc-rio.br>", | 250 | "<beltrano@example.com>", |
| 251 | "<sicrano@tecgraf.puc-rio.br>" | 251 | "<sicrano@example.com>" |
| 252 | } | 252 | } |
| 253 | 253 | ||
| 254 | mesgt = { | 254 | mesgt = { |
| 255 | headers = { | 255 | headers = { |
| 256 | to = "Fulano da Silva <fulano@tecgraf.puc-rio.br>", | 256 | to = "Fulano da Silva <fulano@example.com>", |
| 257 | cc = '"Beltrano F. Nunes" <beltrano@tecgraf.puc-rio.br>', | 257 | cc = '"Beltrano F. Nunes" <beltrano@example.com>', |
| 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") | |||
| 334 | source = smtp.message{ | 334 | source = 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 <sicrano@tecgraf.puc-rio.br>", | 337 | from = "Sicrano de Oliveira <sicrano@example.com>", |
| 338 | to = "Fulano da Silva <fulano@tecgraf.puc-rio.br>", | 338 | to = "Fulano da Silva <fulano@example.com>", |
| 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 |
| 380 | r, e = smtp.send{ | 380 | r, e = smtp.send{ |
| 381 | from = "<sicrano@tecgraf.puc-rio.br>", | 381 | from = "<sicrano@example.com>", |
| 382 | rcpt = "<fulano@tecgraf.puc-rio.br>", | 382 | rcpt = "<fulano@example.com>", |
| 383 | source = source, | 383 | source = source, |
| 384 | } | 384 | } |
| 385 | </pre> | 385 | </pre> |
