Note that there are some explanatory texts on larger screens.

plurals
  1. POHow to implement a program that can sent email in linux with exchange server host(outbound.company.com)
    primarykey
    data
    text
    <p>I want to implement the program which can sent email <strong>automatically</strong> at the given time everyday. And make the effect just like no-reply@amazon.com. <br> I have tried a lot of solution ,but none of these solution work.<br> Who have this experience,<strong>please give me a solution</strong> . <br> Thanks a lot !<br></p> <pre><code>my python code&lt;br&gt; import smtplib from email.mime.multipart import MIMEMultipart from email.mime.text import MIMEText # you == recipient's email address me = "no-reply@companyname.com" you = "IDabc@company.com" # Create message container - the correct MIME type is multipart/alternative. msg = MIMEMultipart('alternative') msg['Subject'] = "Link" msg['From'] = me msg['To'] = you # Create the body of the message (a plain-text and an HTML version). text = "Hi!\nHow are you?\nHere is the link you wanted:\nhttp://www.python.org" html = """\ &lt;html&gt; &lt;head&gt;&lt;/head&gt; &lt;body&gt; &lt;p&gt;Hi!&lt;br&gt; How are you?&lt;br&gt; Here is the &lt;a href="http://www.python.org"&gt;link&lt;/a&gt; you wanted. &lt;/p&gt; &lt;/body&gt; &lt;/html&gt; """ # Record the MIME types of both parts - text/plain and text/html. part1 = MIMEText(text, 'plain') part2 = MIMEText(html, 'html') # Attach parts into message container. # According to RFC 2046, the last part of a multipart message, in this case # the HTML message, is best and preferred. msg.attach(part1) msg.attach(part2) # Send the message via exchange sever SMTP server. s = smtplib.SMTP('outbound.companyname.com') # sendmail function takes 3 arguments: sender's address, recipient's address # and message to send - here it is sent as one string. s.sendmail(me, you, msg.as_string()) s.quit() </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload