Hex Artifact Content
Logged in as anonymous

Artifact 85cf40bbe7cc629c14e2c973ae128223dbde85133224c87379a4783c9d5a840d:


0000: 2f 2f 21 20 53 69 6d 70 6c 65 20 53 4d 54 50 2d  //! Simple SMTP-
0010: 74 6f 2d 54 65 6c 65 67 72 61 6d 20 67 61 74 65  to-Telegram gate
0020: 77 61 79 2e 20 43 61 6e 20 70 61 72 73 65 20 65  way. Can parse e
0030: 6d 61 69 6c 20 61 6e 64 20 73 65 6e 64 20 74 68  mail and send th
0040: 65 6d 20 61 73 20 74 65 6c 65 67 72 61 6d 0a 2f  em as telegram./
0050: 2f 21 20 6d 65 73 73 61 67 65 73 20 74 6f 20 73  /! messages to s
0060: 70 65 63 69 66 69 65 64 20 63 68 61 74 73 2c 20  pecified chats, 
0070: 67 65 6e 65 72 61 6c 6c 79 20 79 6f 75 20 73 70  generally you sp
0080: 65 63 69 66 79 20 77 68 69 63 68 20 65 6d 61 69  ecify which emai
0090: 6c 20 61 64 64 72 65 73 73 20 69 73 0a 2f 2f 21  l address is.//!
00a0: 20 61 76 61 69 6c 61 62 6c 65 20 69 6e 20 63 6f   available in co
00b0: 6e 66 69 67 75 72 61 74 69 6f 6e 2c 20 65 76 65  nfiguration, eve
00c0: 72 79 74 68 69 6e 67 20 65 6c 73 65 20 69 73 20  rything else is 
00d0: 73 65 6e 74 20 74 6f 20 64 65 66 61 75 6c 74 20  sent to default 
00e0: 61 64 64 72 65 73 73 2e 0a 0a 75 73 65 20 61 73  address...use as
00f0: 79 6e 63 5f 63 6f 6d 70 61 74 3a 3a 43 6f 6d 70  ync_compat::Comp
0100: 61 74 3b 0a 75 73 65 20 73 74 61 63 6b 65 64 5f  at;.use stacked_
0110: 65 72 72 6f 72 73 3a 3a 20 52 65 73 75 6c 74 3b  errors:: Result;
0120: 0a 0a 2f 2f 20 6d 61 69 6e 20 66 75 6e 63 74 69  ..// main functi
0130: 6f 6e 20 73 74 75 62 20 74 68 61 74 20 65 78 65  on stub that exe
0140: 63 75 74 65 73 20 6d 61 69 6e 20 63 6f 64 65 20  cutes main code 
0150: 66 72 6f 6d 20 6c 69 62 0a 66 6e 20 6d 61 69 6e  from lib.fn main
0160: 20 28 29 20 2d 3e 20 52 65 73 75 6c 74 3c 28 29   () -> Result<()
0170: 3e 20 7b 0a 09 73 6d 6f 6c 3a 3a 62 6c 6f 63 6b  > {..smol::block
0180: 5f 6f 6e 28 43 6f 6d 70 61 74 3a 3a 6e 65 77 28  _on(Compat::new(
0190: 61 73 79 6e 63 20 7b 0a 09 09 73 6d 74 70 32 74  async {...smtp2t
01a0: 67 3a 3a 61 73 79 6e 63 5f 6d 61 69 6e 28 29 2e  g::async_main().
01b0: 61 77 61 69 74 0a 09 7d 29 29 0a 7d 0a           await..})).}.