zhyiwww
          用平實的筆,記錄編程路上的點點滴滴………
          posts - 536,comments - 394,trackbacks - 0
          [1]script/plugin install? -f? svn://rubyforge.org/var/svn/slantwise/yaml_mail_config/trunk

          [2]edit config/email.yml

          development:
          ??? server: 192.168.1.18
          ??? port: 25
          ??? domain: yyyyy.com
          ??? authentication: login
          ??? username: xxxxxx
          ??? password: xxxxxx

          #? production:
          #??? server: mail.domain.com
          #??? port: 465
          #??? domain: domain.com
          #??? authentication: login
          #??? username: email_account_login
          #??? password: email_account_password
          #??? tls: true

          [3]script/general mailer OrderMailer

          ???? def order_placed(receiver,subject,message,send_at)
          ?
          ??? recipients receiver
          ??? bcc ["xxx@yyyyy.com"]
          ??? from "service@yyyyy.com"
          ??? subject "this is the subject"
          ??? body "this is the body"
          ???
          ? end?

          [4]send
          mail OrderMailer.create_order_placed("aaa@xxxxyyy.com","here is subject","here is message",Time.now)
          OrderMailer.deliver(mail)

          ok




          |----------------------------------------------------------------------------------------|
                                     版權聲明  版權所有 @zhyiwww
                      引用請注明來源 http://www.aygfsteel.com/zhyiwww   
          |----------------------------------------------------------------------------------------|
          posted on 2009-03-25 11:49 zhyiwww 閱讀(332) 評論(0)  編輯  收藏 所屬分類: ruby on rails
          主站蜘蛛池模板: 隆林| 山东省| 渭南市| 修武县| 濉溪县| 龙陵县| 仙居县| 重庆市| 浮山县| 淳安县| 平塘县| 澎湖县| 怀安县| 怀柔区| 张家口市| 高淳县| 新乐市| 延津县| 甘南县| 大洼县| 锡林郭勒盟| 北流市| 中牟县| 盖州市| 唐海县| 黄石市| 图片| 信丰县| 永善县| 卢龙县| 张家界市| 玛纳斯县| 莲花县| 合山市| 酒泉市| 临夏县| 清原| 两当县| 江川县| 陕西省| 景泰县|