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 閱讀(326) 評論(0)  編輯  收藏 所屬分類: ruby on rails
          主站蜘蛛池模板: 微山县| 北海市| 临朐县| 翁牛特旗| 和平县| 阳原县| 磴口县| 政和县| 广东省| 济南市| 福贡县| 襄樊市| 彭州市| 黄山市| 岳普湖县| 花莲市| 鹤山市| 青州市| 长治县| 济源市| 富民县| 佛冈县| 澳门| 杂多县| 奇台县| 霍邱县| 正宁县| 巴林右旗| 张家界市| 渝北区| 凤城市| 沭阳县| 固始县| 皋兰县| 巴青县| 托克逊县| 陇西县| 都江堰市| 沾益县| 永新县| 内乡县|