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
          主站蜘蛛池模板: 新河县| 庆安县| 鹰潭市| 聊城市| 响水县| 邹平县| 徐闻县| 阿巴嘎旗| 招远市| 新田县| 英德市| 河东区| 鹿泉市| 永清县| 化德县| 巢湖市| 平遥县| 陇西县| 蒙山县| 于都县| 大港区| 高要市| 肇东市| 宜兰县| 天等县| 鸡东县| 修文县| 崇明县| 会泽县| 游戏| 永州市| 灵石县| 贵溪市| 宜州市| 边坝县| 平遥县| 康平县| 辉南县| 准格尔旗| 如皋市| 鄂托克前旗|