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 閱讀(325) 評論(0)  編輯  收藏 所屬分類: ruby on rails
          主站蜘蛛池模板: 鄂伦春自治旗| 彭山县| 永丰县| 龙口市| 洛川县| 黎川县| 桂东县| 清丰县| 儋州市| 江津市| 苍山县| 五大连池市| 于都县| 巴林右旗| 亚东县| 资中县| 萝北县| 达孜县| 浦城县| 南木林县| 金溪县| 普兰县| 长子县| 永春县| 洛宁县| 龙游县| 岳阳市| 古蔺县| 静乐县| 丹东市| 开化县| 福州市| 定远县| 平邑县| 虞城县| 林口县| 正蓝旗| 甘泉县| 长宁县| 句容市| 明星|