Line 66: |
Line 66: |
| ===Method 1=== | | ===Method 1=== |
| ---- | | ---- |
− | | + | For this first example, lets send an email containing the message "'''Hello, JustTesting'''", from the hypothetical address ''' [email protected]''' to ''' [email protected]''' using Gmail's SMTP settings: |
| | | |
− | | + | |
| | | |
− | Let's examine this command in detail. First, the '''echo <span style=color:green>-e</span> "<span style=color:blue>subject:Test</span><span style=color:red>\n</span><span style=color:blue>from: [email protected]</span><span style=color:red>\n</span><span style=color:blue> Testing</span>"''' part: | + | Let's examine this command in detail. First, the '''echo <span style=color:green>-e</span> "<span style=color:blue>subject:Test</span><span style=color:red>\n</span><span style=color:blue>from: [email protected]</span><span style=color:red>\n</span><span style=color:blue> Hello,</span><span style=color:red>\n\n</span><span style=color:blue>JustTesting</span>"''' part: |
| | | |
| '''echo''' - prints the specified arguments to stdout | | '''echo''' - prints the specified arguments to stdout |
| | | |
− | '''<span style=color:green>-e</span>''' - makes the echo command interpret backslash escapes (</span><span style=color:red>\n</span> in this case)
| + | <span style=color:green>'''-e'''</span> - makes the echo command interpret backslash escapes (</span><span style=color:red>\n</span> in this case) |
− | | |
− | <span style=color:red>\n</span> - the end line symbol, i.e., it indicates that the following text begins in another line. The </span><span style=color:red>\n</span> part itself is not interpreted as part of the text if '''<span style=color:green>-e</span>''' is specified.
| |
| | | |
| + | <span style=color:red>'''\n'''</span> - the end line symbol, i.e., it indicates that the following text begins in another line. The </span><span style=color:red>\n</span> part itself is not interpreted as part of the text if '''<span style=color:green>-e</span>''' is specified. |
| | | |
| + | The text highlighted in blue specifies the mail's header information (excluding the recipient's address) and body. In our case it represents this: |
| | | |
| + | '''Subject''': <span style=color:blue>Test</span> |
| + | |
| + | '''Body of text''': |
| + | <span style=color:blue>Hello, |
| + | JustTesting</span> |
| + | |
| sendmail -v -H "exec openssl s_client -quiet -connect smtp.gma | | sendmail -v -H "exec openssl s_client -quiet -connect smtp.gma |
| | | |
| | | |