Automatically send in welcome mail

Source: Internet
Author: User

When I wandered online yesterday, I found Apple's welcome mail, talking about the "work" and a few words in Apple's company. It's a very resonant one. It allows me to see the power of faith, the love of creation. It's just burning!

The rough translation is as follows:


There is a job just work. There is a job that you pursue for life.


This kind of work is made up of all your feelings. You never compromise on this kind of work. This kind of work will also make you willing to sacrifice the weekend. You can find such a job in Apple. The people here don't wander, they strokes 3,000.


They want to have something different about their work.


Something important, things that can't be gotten anywhere else.


Welcome to Apple.

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M01/5B/7B/wKioL1UKZJeyliCnAAICLIMirKc030.jpg "title=" Blog1.jpg "alt=" Wkiol1ukzjeylicnaaiclimirkc030.jpg "/>

Objective:

First, the staff on the day will receive the system automatically send welcome mail, reflecting the company's humanistic concern

Second, the entry staff can check the attachment before the new training, alleviate the work pressure of our service team colleagues

Third, follow-up can add other departments of the documents and precautions, free of new colleagues at a loss


Ideas:

When the new recruits, the administrative colleagues in the personnel system input, five o'clock in the morning sync to the Active Directory, I later pull out from the Active Directory creation time is today's users send mail.


script as follows

<#. notes=========================================================================== created with:  Sapien technologies, inc., powershell studio 2014 v4.1.63 created on:    2015/3/19 10:10 Created by:   xing_ji Organization:   filename:     ================================================================= ==========. Descriptiona description of the file.#> $host. Ui. rawui.windowtitle =  "Send welcome mail edit by_xing_ji" Import-Module  activedirectory# filter out non-account never expires, enabled and account name *_* user, this line changes according to actual needs can $alluser=get-aduser -filter  ' passwordneverexpires -eq  "false"  -and enabled -eq  "true"  -and name  -like  "*_*" '  | Foreach{$_.name} $createdday =get-aduser  $user  -properties * | foreach{$_.whencreated}$ now=get-date$yes=get-date -format  "Yyyy-mm-dd" $being _days= ($now  -  $createdday). Daysif ($being _days -eq 0) {    #Write-output  $user $chineseusername=  get-aduser  $user   -properties * | foreach{$_.  surname}      $Emailbody =     "Dear   $chineseusername  : ' N There is a job just work. There is a job that you pursue for life. ' N This kind of work is all about you and your whole love. You never compromise on this kind of work. This kind of work will also make you ' n willing to sacrifice the weekend. You can find such a job in Lian Qiang. People here do not wander, they come here and hit ' N water 3,000. ' N they want their work to have something different. ' N something important, things that can't be gotten anywhere else. ' N Welcome to Lian Qiang. "send-mailmessage -from " [email protected] " -to " [email protected] " - subject  "$chineseusername   Welcome to Lian Qiang! " -Body " $Emailbody " -SmtpServer " relay.cn.synnex-grp.com " -Attachments " D:\Log\ Send_welcome_mail\ New Guide Catalogue-complete version. ppt " -encoding utf8# logging function   $user  >> d:\log\send_ Welcome_mail\ $yes. txt    }}


Effect:

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M02/5B/81/wKiom1UKa7qB7SgwAAL6epOlLKk538.jpg "title=" Blog2.jpg "alt=" Wkiom1uka7qb7sgwaal6epollkk538.jpg "/>

Summarize:

in fact, the script is not difficult, flexible application is the key. The steps to add this script to a scheduled task are omitted, so refer to this blog . I hope I can help you.

This article is from the "Talk" blog, please be sure to keep this source http://jixing.blog.51cto.com/821242/1622197

Automatically send in welcome mail

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.