Wednesday, September 08, 2010

Viewing Category


Mail

 

    24

    Trên blog cá nhân, Mitchel Sellers đã post 1 bài viết về vấn đề có quá nhiều release của Dotnetnuke trong thời gian gần đây và trong thời gian ngắn. Nó gây ra nhiều vấn đề. Và ông khuyên mọi người cần có những hành động đúng đắn khi chọn lựa version.

    Các bạn có thể đọc tại đây.

    http://www.mitchelsellers.com/blogs/articletype/articleview/articleid/338/dotnetnuke-growing-pains-and-you-how-to-cope.aspx

    [Read the rest of this article...]

    Posted in: Mail
    05

    Khi mình đọc 1 cuốn sách về MVC, tình cờ có 1 ví dụ send email dạng offline. Tức là nó sẽ lưu email lại dưới dạng email message trên máy của mình, chứ không send. Ta có thể dùng nó để test cho các ứng dụng trên máy local cũng được.

    Mình đã thử chạy nó trên site dotnetnuke và thành công. Tất nhiên nó cũng có thể chạy trên các site .NET khác.

    Và dưới đây là code:

    -Trên web.config, ta thêm các dòng sau đây

    <system.net>

        <mailSettings>

          <smtp deliveryMethod="SpecifiedPickupDirectory">

            <specifiedPickupDirectory pickupDirectoryLocation="e:\myprojects\email" />

          </smtp>

        </mailSettings>

      </system.net>

      <system.web>

        <machineKey validationKey=

    Thêm ngay phía trước của system.web.

    [Read the rest of this article...]

    Posted in: Mail
    23

    Sau đây là câu lệnh để gửi email trong DNN:

    string sendTo = PortalSettings.Email; //Hoac dia chi nao ma ban muon gui toi
    DotNetNuke.Services.Mail.Mail.SendMail(PortalSettings.Email, sendTo, "", "Chu de cua mail", "Noi dung cua mail", "", "HTML", "", "", "", "");

     

    [Read the rest of this article...]

    Posted in: Mail
    22

    Trong quá trình cài đặt và sử dụng site, mình đã gặp một số vấn đề sau:

    -Nếu đăng kí 1 account mới với email là abc@mydomain.com (ở đây là abc@nguyenminhduc.net) thì sẽ nhận được email thông báo sau khi đăng kí thành công. Tuy nhiên nếu đăng kí với email abc@yahoo.com/gmail.com... thì lại không nhận được thông tin gì cả.

    Vào Event Viewer thì sẽ thấy được thông báo sau:

    System.Net.Mail.SmtpException: Bad sequence of commands. The server response was: This mail server requires authentication when attempting to send to a non-local e-mail address. Please check your mail client settings or contact your administrator to verify that the domain or address is defined for this server. at System.Net.Mail.RecipientCommand.CheckResponse(SmtpStatusCode statusCode, String response) at System.Net.Mail.SmtpTransport.SendMail(MailAddress sender, MailAddressCollection recipients, String deliveryNotify, SmtpFailedRecipientException& exception) at System.Net.Mail.SmtpClient.Send(MailMessage message) at DotNetNuke.Services.Mail.Mail.SendMail(String MailFrom, String MailTo, String Cc, String Bcc, MailPriority Priority, String Subject, MailFormat BodyFormat, Encoding BodyEncoding, String Body, String Attachment, String SMTPServer, String SMTPAuthentication, String SMTPUsername, String SMTPPassword, Boolean SMTPEnableSSL)

    Mất cả buổi lần mò, tìm kiếm, mình đã tìm được cách từ link sau:

    _http://www.orizonti.com/Support/Forums/tabid/785/forumid/9/postid/1476/view/topic/Default.aspx

    Cách giải quyết:

    Đăng nhập với quyền host, vào Host->Host settings->SMTP settings, thiết lập như sau:

    SMTP Server = 127.0.0.1
    Authentication = Anonymous
    SMTP Username = blank as in no value (để trống)
    SMTP Password = blank as in no value (để trống)

    [Read the rest of this article...]

    Posted in: Mail
    HomeTrangITForum
    Copyright 2010 by Nguyễn Minh ĐứcDesigned by DyNNamiteTerms Of UsePrivacy Statement