コード例 #1
0
        public static void SendSuccessfulBidUpdateLetter(string emailTo, long auctionID, string loginName, string auctionName, string usersbid, string usersmaxbid, string auctionEndDate, string newBidUrl, bool IsMaxBidOrAmount)
        {
            UniMail.Template template =
                new UniMail.Template(HttpContext.Current.Server.MapPath(@"~\Templates\Mail\bidUpdate_login.txt"), bidding_mail)
            {
                Encoding = Encoding.UTF8, ToEmail = emailTo
            };

            template.Data.Add("{{auctionID}}", auctionID);
            template.Data.Add("{{loginName}}", loginName);

            template.Data.Add("{{auctionName}}", auctionName);
            template.Data.Add("{{usersbid}}", usersbid);
            template.Data.Add("{{usersmaxbid}}", usersmaxbid);
            template.Data.Add("{{auctionEndDate}}", auctionEndDate);
            template.Data.Add("{{newBidUrl}}", newBidUrl);

            if (IsMaxBidOrAmount)
            {
                template.Data.Add("{{change_maxbid}}", "maximum bid was raised to");
                template.Data.Add("{{was_not_change_maxbid}}", "");
                template.Data.Add("{{change_bid}}", "current bid in the amount of");
                template.Data.Add("{{was_not_change_bid}}", "was not changed");
            }
            else
            {
                template.Data.Add("{{change_maxbid}}", "current maximum bid in the amount of");
                template.Data.Add("{{was_not_change_maxbid}}", "was not change");
                template.Data.Add("{{change_bid}}", "bid was raised to");
                template.Data.Add("{{was_not_change_bid}}", "");
            }
            ParseCommonData(template);

            UniMail.Mailer.Enqueue(template.Render(), bidding_mail);
        }
コード例 #2
0
        public static void SendDOWFailedLetter(string emailTo, long auctionID, string loginName)
        {
            UniMail.Template template = new UniMail.Template(HttpContext.Current.Server.MapPath(@"~\Templates\Mail\dowFailed.txt"));

            template.Encoding = System.Text.Encoding.UTF8;
            template.ToEmail  = emailTo;
            template.Data.Add("{{auctionID}}", auctionID);
            template.Data.Add("{{loginName}}", loginName);
            ParseCommonData(template);
            UniMail.Mailer.Send(template.Render());;
        }
コード例 #3
0
        public static void ResendConfirmationCode(string emailTo, string loginName, string confirmationUrl)
        {
            UniMail.Template template = new UniMail.Template(HttpContext.Current.Server.MapPath(@"~\Templates\Mail\resendConfirmationCode.txt"));

            template.Encoding = System.Text.Encoding.UTF8;
            template.ToEmail  = emailTo;
            template.Data.Add("{{loginName}}", loginName);
            template.Data.Add("{{confirmation}}", confirmationUrl);
            ParseCommonData(template);
            UniMail.Mailer.Send(template.Render());
        }
コード例 #4
0
 public static void ForgotPassword(string emailTo, string loginName, string password, string url)
 {
     UniMail.Template template = new UniMail.Template(HttpContext.Current.Server.MapPath(@"~\Templates\Mail\passwordReset.txt"));
     template.Encoding = System.Text.Encoding.UTF8;
     template.ToEmail  = emailTo;
     template.Data.Add("{{loginName}}", loginName);
     template.Data.Add("{{password}}", password);
     template.Data.Add("{{confirmurl}}", url);
     ParseCommonData(template);
     UniMail.Mailer.Send(template.Render());
 }
コード例 #5
0
ファイル: Mail.cs プロジェクト: clpereira2001/Lelands-Master
        //public static void SendInvoice(string emailTo, string invoice_id)
        //{
        //  UniMail.Template template = new UniMail.Template(HttpContext.Current.Server.MapPath(@"~\Templates\Mail\Invoices.txt"));
        //  template.Encoding = System.Text.Encoding.UTF8;
        //  template.ToEmail = emailTo;
        //  ParseCommonData(template);
        //  UniMail.Mailer.Enqueue(template.Render(HttpContext.Current.Server.MapPath(@"~\Pool\Invoices\"+invoice_id+".pdf"))); ;
        //}

        public static void Temp_SendInvoiceInformationLetter(string FirstName, string LastName, string emailTo, string invoice_id)
        {
            UniMail.Template template = new UniMail.Template(HttpContext.Current.Server.MapPath(@"~\Templates\Mail\PreviewAuctionInvoice.txt"));
            template.Encoding = System.Text.Encoding.UTF8;
            template.ToEmail  = emailTo;
            template.Data.Add("{{firstName}}", FirstName);
            template.Data.Add("{{lastName}}", LastName);
            template.Data.Add("{{invoice_id}}", invoice_id);
            ParseCommonData(template);
            UniMail.Mailer.Enqueue(template.Render());
        }
コード例 #6
0
        public static void SendFreeEmailRegisterConfirmation(string emailTo, string firstName, string lastName, string url)
        {
            UniMail.Template template = new UniMail.Template(HttpContext.Current.Server.MapPath(@"~\Templates\Mail\registerFreeEmailConfirm.txt"));

            template.Encoding = System.Text.Encoding.UTF8;
            template.ToEmail  = emailTo;
            template.Data.Add("{{FirstName}}", firstName);
            template.Data.Add("{{LastName}}", lastName);
            template.Data.Add("{{Url}}", url);
            ParseCommonData(template);
            UniMail.Mailer.Send(template.Render());;
        }
コード例 #7
0
ファイル: Mail.cs プロジェクト: clpereira2001/Lelands-Master
    public static void SendApprovalConfirmation(string emailTo, string loginName, string firstName, string lastName)
    {
      UniMail.Template template = new UniMail.Template(HttpContext.Current.Server.MapPath(@"~\Templates\Mail\AccountApproved.txt"));

      template.Encoding = System.Text.Encoding.UTF8;
      template.ToEmail = emailTo;
      template.Data.Add("{{loginName}}", loginName);
      template.Data.Add("{{firstName}}", firstName);
      template.Data.Add("{{lastName}}", lastName);
      ParseCommonData(template);
      UniMail.Mailer.Send(template.Render());
    }
コード例 #8
0
 //EmailConfirmationCode
 public static void EmailConfirmationCode(string FirstName, string LastName, string emailTo, string loginName, string confirmationUrl)
 {
     UniMail.Template template = new UniMail.Template(HttpContext.Current.Server.MapPath(@"~\Templates\Mail\emailConfirmationCode.txt"), registration_mail);
     template.Encoding = System.Text.Encoding.UTF8;
     template.ToEmail  = emailTo;
     template.Data.Add("{{loginName}}", loginName);
     template.Data.Add("{{confUrl}}", confirmationUrl);
     template.Data.Add("{{firstName}}", FirstName);
     template.Data.Add("{{lastName}}", LastName);
     ParseCommonData(template);
     UniMail.Mailer.Enqueue(template.Render(), registration_mail);
 }
コード例 #9
0
 //ForgotPassword
 public static void ForgotPassword(string FirstName, string LastName, string emailTo, string loginName, string password)
 {
     UniMail.Template template = new UniMail.Template(HttpContext.Current.Server.MapPath(@"~\Templates\Mail\passwordReset.txt"), registration_mail);
     template.Encoding = System.Text.Encoding.UTF8;
     template.ToEmail  = emailTo;
     template.Data.Add("{{login}}", loginName);
     template.Data.Add("{{password}}", password);
     template.Data.Add("{{FirstName}}", FirstName);
     template.Data.Add("{{LastName}}", LastName);
     ParseCommonData(template);
     UniMail.Mailer.Enqueue(template.Render(), registration_mail);
 }
コード例 #10
0
ファイル: Mail.cs プロジェクト: clpereira2001/Lelands-Master
        public static void SendApprovalConfirmation(string emailTo, string loginName, string firstName, string lastName)
        {
            UniMail.Template template = new UniMail.Template(HttpContext.Current.Server.MapPath(@"~\Templates\Mail\AccountApproved.txt"));

            template.Encoding = System.Text.Encoding.UTF8;
            template.ToEmail  = emailTo;
            template.Data.Add("{{loginName}}", loginName);
            template.Data.Add("{{firstName}}", firstName);
            template.Data.Add("{{lastName}}", lastName);
            ParseCommonData(template);
            UniMail.Mailer.Send(template.Render());
        }
コード例 #11
0
ファイル: Mail.cs プロジェクト: clpereira2001/Lelands-Master
 public static void Temp_SendConsignmentInformationLetter(string FirstName, string LastName, string emailTo, string consignment_id, string eventname, string auctionenddate)
 {
     UniMail.Template template = new UniMail.Template(HttpContext.Current.Server.MapPath(@"~\Templates\Mail\Consignments.txt"));
     template.Encoding = System.Text.Encoding.UTF8;
     template.ToEmail  = emailTo;
     template.Data.Add("{{firstName}}", FirstName);
     template.Data.Add("{{lastName}}", LastName);
     template.Data.Add("{{invoice_id}}", consignment_id);
     template.Data.Add("{{eventname}}", eventname);
     template.Data.Add("{{auctionenddate}}", auctionenddate);
     ParseCommonData(template);
     UniMail.Mailer.Enqueue(template.Render());
 }
コード例 #12
0
ファイル: Mail.cs プロジェクト: clpereira2001/Lelands-Master
        public static void SendPulledOutLetter(string FirstName, string LastName, string emailTo, long auctionID, string auctionName)
        {
            UniMail.Template template = new UniMail.Template(HttpContext.Current.Server.MapPath(@"~\Templates\Mail\WithdrawnItem.txt"));

            template.Encoding = System.Text.Encoding.UTF8;
            template.ToEmail  = emailTo;
            template.Data.Add("{{auctionID}}", auctionID);
            template.Data.Add("{{auctionName}}", auctionName);
            template.Data.Add("{{firstName}}", FirstName);
            template.Data.Add("{{lastName}}", LastName);
            ParseCommonData(template);

            UniMail.Mailer.Enqueue(template.Render());
        }
コード例 #13
0
ファイル: Mail.cs プロジェクト: clpereira2001/Lelands-Master
 public static void SendOutBidLetter(string FirstName, string LastName, string emailTo, string lot, string auctionName, string currentSuccessfulBid, string auctionEndDate, string newBidUrl)
 {
   UniMail.Template template = new UniMail.Template(HttpContext.Current.Server.MapPath(@"~\Templates\Mail\outBid.txt"));
   template.Encoding = System.Text.Encoding.UTF8;
   template.ToEmail = emailTo;      
   template.Data.Add("{{lot}}", lot);
   template.Data.Add("{{auctionName}}", auctionName);
   template.Data.Add("{{currentSuccessfulBid}}", currentSuccessfulBid);
   template.Data.Add("{{auctionEndDate}}", auctionEndDate);
   template.Data.Add("{{newBidUrl}}", newBidUrl);
   template.Data.Add("{{firstName}}", FirstName);
   template.Data.Add("{{lastName}}", LastName);
   ParseCommonData(template);
   UniMail.Mailer.Enqueue(template.Render());
 }
コード例 #14
0
 public static void SendOutBidMultipleLetter(string emailTo, long auctionID, string loginName, string auctionName, /*string currentSuccessfulBid,*/ string auctionEndDate, string curwinquanty, string quantity, string newBidUrl)
 {
     UniMail.Template template = new UniMail.Template(HttpContext.Current.Server.MapPath(@"~\Templates\Mail\outBidMultiple_login.txt"), bidding_mail);
     template.Encoding = System.Text.Encoding.UTF8;
     template.ToEmail  = emailTo;
     template.Data.Add("{{auctionID}}", auctionID.ToString());
     template.Data.Add("{{loginName}}", loginName);
     template.Data.Add("{{auctionName}}", auctionName);
     template.Data.Add("{{quantity}}", quantity);
     template.Data.Add("{{auctionEndDate}}", auctionEndDate);
     template.Data.Add("{{newBidUrl}}", newBidUrl);
     template.Data.Add("{{curwin}}", curwinquanty);
     ParseCommonData(template);
     UniMail.Mailer.Enqueue(template.Render(), bidding_mail);
 }
コード例 #15
0
 public static void SendOutBidLetter(string FirstName, string LastName, string emailTo, string lot, string auctionName, string currentSuccessfulBid, string auctionEndDate, string newBidUrl)
 {
     UniMail.Template template = new UniMail.Template(HttpContext.Current.Server.MapPath(@"~\Templates\Mail\outBid.txt"));
     template.Encoding = System.Text.Encoding.UTF8;
     template.ToEmail  = emailTo;
     template.Data.Add("{{lot}}", lot);
     template.Data.Add("{{auctionName}}", auctionName);
     template.Data.Add("{{currentSuccessfulBid}}", currentSuccessfulBid);
     template.Data.Add("{{auctionEndDate}}", auctionEndDate);
     template.Data.Add("{{newBidUrl}}", newBidUrl);
     template.Data.Add("{{firstName}}", FirstName);
     template.Data.Add("{{lastName}}", LastName);
     ParseCommonData(template);
     UniMail.Mailer.Enqueue(template.Render());
 }
コード例 #16
0
        public static void SendMessageFromConsignor(string FirstName, string LastName, string Email, string Phone, string BestTime, string Description)
        {
            UniMail.Template template = new UniMail.Template(HttpContext.Current.Server.MapPath(@"~\Templates\Mail\MessageFromConsignor.txt"));
            template.Encoding = System.Text.Encoding.UTF8;
            template.ToEmail  = ConfigurationManager.AppSettings["ConsignorMessagesEmail"];
            template.Data.Add("{{firstname}}", FirstName);
            template.Data.Add("{{lastname}}", LastName);
            template.Data.Add("{{email}}", Email);
            template.Data.Add("{{phone}}", Phone);
            template.Data.Add("{{best}}", BestTime);
            template.Data.Add("{{description}}", Description);
            ParseCommonData(template);

            UniMail.Mailer.Send(template.Render());
        }
コード例 #17
0
ファイル: Mail.cs プロジェクト: clpereira2001/Lelands-Master
        public static void SendWinningLetter(string FirstName, string LastName, string emailTo, long auctionID, string auctionName, string usersbid)
        {
            UniMail.Template template = new UniMail.Template(HttpContext.Current.Server.MapPath(@"~\Templates\Mail\winningBid.txt"));

            template.Encoding = System.Text.Encoding.UTF8;
            template.ToEmail  = emailTo;
            template.Data.Add("{{auctionID}}", auctionID);
            template.Data.Add("{{auctionName}}", auctionName);
            template.Data.Add("{{usersbid}}", usersbid);
            //template.Data.Add("{{usersmaxbid}}", usersmaxbid);
            template.Data.Add("{{firstName}}", FirstName);
            template.Data.Add("{{lastName}}", LastName);
            ParseCommonData(template);

            UniMail.Mailer.Enqueue(template.Render());
        }
コード例 #18
0
        //SendDepositPaymentConfirmation
        public static void SendDepositPaymentConfirmation(string FirstName, string LastName, string emailTo, decimal DepositAmount, string TransactionID, string PaymentMethod)
        {
            UniMail.Template template = new UniMail.Template(HttpContext.Current.Server.MapPath(@"~\Templates\Mail\DepositPaymentConfirmation.txt"), invoices_mail);
            template.Encoding = System.Text.Encoding.UTF8;
            template.ToEmail  = emailTo;

            template.Data.Add("{{TransactionID}}", TransactionID);
            template.Data.Add("{{firstName}}", FirstName);
            template.Data.Add("{{lastName}}", LastName);
            template.Data.Add("{{PaymentType}}", PaymentMethod);
            template.Data.Add("{{amount}}", DepositAmount.GetCurrency());

            ParseCommonData(template);

            UniMail.Mailer.Enqueue(template.Render(), invoices_mail);
        }
コード例 #19
0
        public static void SendOutBidLetter(string emailTo, long auctionID, string loginName, string auctionName, string currentSuccessfulBid, string auctionEndDate, string newBidUrl)
        {
            UniMail.Template template = new UniMail.Template(HttpContext.Current.Server.MapPath(@"~\Templates\Mail\outBid_login.txt"), bidding_mail)
            {
                Encoding = Encoding.UTF8, ToEmail = emailTo
            };

            template.Data.Add("{{auctionID}}", auctionID.ToString(CultureInfo.InvariantCulture));
            template.Data.Add("{{loginName}}", loginName);
            template.Data.Add("{{auctionName}}", auctionName);
            template.Data.Add("{{currentSuccessfulBid}}", currentSuccessfulBid);
            template.Data.Add("{{auctionEndDate}}", auctionEndDate);
            template.Data.Add("{{newBidUrl}}", newBidUrl);
            ParseCommonData(template);
            UniMail.Mailer.Enqueue(template.Render(), bidding_mail);
        }
コード例 #20
0
ファイル: Mail.cs プロジェクト: clpereira2001/Lelands-Master
    public static void SendOutBidMultipleLetter(string emailTo, long auctionID, string loginName, string auctionName, string currentSuccessfulBid, string auctionEndDate, string newBidUrl)
    {
      UniMail.Template template = new UniMail.Template(HttpContext.Current.Server.MapPath(@"~\Templates\Mail\outBidMultiple.txt"));

      template.Encoding = System.Text.Encoding.UTF8;
      template.ToEmail = emailTo;
      template.Data.Add("{{auctionID}}", auctionID.ToString());
      template.Data.Add("{{loginName}}", loginName);
      template.Data.Add("{{auctionName}}", auctionName);
      template.Data.Add("{{currentSuccessfulBid}}", currentSuccessfulBid);
      template.Data.Add("{{auctionEndDate}}", auctionEndDate);
      template.Data.Add("{{newBidUrl}}", ConfigurationManager.AppSettings["siteUrl"] + newBidUrl);


      ParseCommonData(template);

      UniMail.Mailer.Send(template.Render());
    }
コード例 #21
0
        public static void SendOutBidMultipleLetter(string emailTo, long auctionID, string loginName, string auctionName, string currentSuccessfulBid, string auctionEndDate, string newBidUrl)
        {
            UniMail.Template template = new UniMail.Template(HttpContext.Current.Server.MapPath(@"~\Templates\Mail\outBidMultiple.txt"));

            template.Encoding = System.Text.Encoding.UTF8;
            template.ToEmail  = emailTo;
            template.Data.Add("{{auctionID}}", auctionID.ToString());
            template.Data.Add("{{loginName}}", loginName);
            template.Data.Add("{{auctionName}}", auctionName);
            template.Data.Add("{{currentSuccessfulBid}}", currentSuccessfulBid);
            template.Data.Add("{{auctionEndDate}}", auctionEndDate);
            template.Data.Add("{{newBidUrl}}", ConfigurationManager.AppSettings["siteUrl"] + newBidUrl);


            ParseCommonData(template);

            UniMail.Mailer.Send(template.Render());
        }
コード例 #22
0
        internal static void SendMailTheLot(string emailTo, string loginName, string ownerEmail, string messageText, long auctionID, string auctionTitle, string auctionDescription, string auctionUrl)
        {
            UniMail.Template template = new UniMail.Template(HttpContext.Current.Server.MapPath(@"~\Templates\Mail\MailTheLot.txt"));

            template.Encoding = System.Text.Encoding.UTF8;
            template.ToEmail  = emailTo;
            template.Data.Add("{{loginName}}", loginName);
            template.Data.Add("{{ownerEmail}}", ownerEmail);
            template.Data.Add("{{messageText}}", messageText);

            template.Data.Add("{{auctionID}}", auctionID);
            template.Data.Add("{{auctionTitle}}", auctionTitle);
            template.Data.Add("{{auctionDescription}}", auctionDescription);
            template.Data.Add("{{auctionUrl}}", auctionUrl);

            ParseCommonData(template);

            UniMail.Mailer.Send(template.Render());;
        }
コード例 #23
0
        public static void SendRefundingDepositConfirmation(string FirstName, string LastName, string emailTo, decimal DepositAmount, string PrevTransactionID, string RefundedTransactionID, string DateFrom, string PaymentMethod, StringBuilder email_template, string SiteURL)
        {
            UniMail.Template template = new UniMail.Template(email_template);

            template.Encoding = System.Text.Encoding.UTF8;
            template.ToEmail  = emailTo;

            template.Data.Add("{{prevTransactionID}}", PrevTransactionID);
            template.Data.Add("{{firstName}}", FirstName);
            template.Data.Add("{{lastName}}", LastName);
            template.Data.Add("{{dateFrom}}", DateFrom);
            template.Data.Add("{{paymentMethod}}", PaymentMethod);
            template.Data.Add("{{transactionID}}", RefundedTransactionID);
            template.Data.Add("{{amount}}", DepositAmount.GetCurrency());

            ParseCommonData(template, SiteURL);

            UniMail.Mailer.Enqueue(template.Render());;
        }
コード例 #24
0
        public static void SendSuccessfulBidLetter(string FirstName, string LastName, string emailTo, long auctionID, string loginName, string auctionName, string usersbid, string usersmaxbid, string auctionEndDate, string newBidUrl)
        {
            UniMail.Template template = new UniMail.Template(HttpContext.Current.Server.MapPath(@"~\Templates\Mail\successfulBid.txt"), bidding_mail);

            template.Encoding = System.Text.Encoding.UTF8;
            template.ToEmail  = emailTo;
            template.Data.Add("{{auctionID}}", auctionID);
            template.Data.Add("{{loginName}}", loginName);

            template.Data.Add("{{auctionName}}", auctionName);
            template.Data.Add("{{usersbid}}", usersbid);
            template.Data.Add("{{usersmaxbid}}", usersmaxbid);
            template.Data.Add("{{auctionEndDate}}", auctionEndDate);
            template.Data.Add("{{newBidUrl}}", newBidUrl);
            template.Data.Add("{{firstName}}", FirstName);
            template.Data.Add("{{lastName}}", LastName);
            ParseCommonData(template);

            UniMail.Mailer.Enqueue(template.Render(), bidding_mail);
        }
コード例 #25
0
ファイル: Mail.cs プロジェクト: clpereira2001/Lelands-Master
    public static void ResendConfirmationCode(string emailTo, string loginName, string confirmationUrl)
    {
      UniMail.Template template = new UniMail.Template(HttpContext.Current.Server.MapPath(@"~\Templates\Mail\resendConfirmationCode.txt"));

      template.Encoding = System.Text.Encoding.UTF8;
      template.ToEmail = emailTo;
      template.Data.Add("{{loginName}}", loginName);
      template.Data.Add("{{confirmation}}", confirmationUrl);
      ParseCommonData(template);
      UniMail.Mailer.Send(template.Render());
    }
コード例 #26
0
ファイル: Mail.cs プロジェクト: clpereira2001/Lelands-Master
 public static void Temp_SendConsignmentInformationLetter(string FirstName, string LastName, string emailTo, string consignment_id, string eventname, string auctionenddate)
 {
     UniMail.Template template = new UniMail.Template(HttpContext.Current.Server.MapPath(@"~\Templates\Mail\Consignments.txt"));
       template.Encoding = System.Text.Encoding.UTF8;
       template.ToEmail = emailTo;
       template.Data.Add("{{firstName}}", FirstName);
       template.Data.Add("{{lastName}}", LastName);
       template.Data.Add("{{invoice_id}}", consignment_id);
       template.Data.Add("{{eventname}}", eventname);
       template.Data.Add("{{auctionenddate}}", auctionenddate);
       ParseCommonData(template);
       UniMail.Mailer.Enqueue(template.Render());
 }
コード例 #27
0
ファイル: Mail.cs プロジェクト: clpereira2001/Lelands-Master
 public static void ForgotPassword(string emailTo, string loginName, string password, string url)
 {
   UniMail.Template template = new UniMail.Template(HttpContext.Current.Server.MapPath(@"~\Templates\Mail\passwordReset.txt"));
   template.Encoding = System.Text.Encoding.UTF8;
   template.ToEmail = emailTo;
   template.Data.Add("{{loginName}}", loginName);
   template.Data.Add("{{password}}", password);
   template.Data.Add("{{confirmurl}}", url);
   ParseCommonData(template);      
   UniMail.Mailer.Send(template.Render());
 }
コード例 #28
0
ファイル: Mail.cs プロジェクト: clpereira2001/Lelands-Master
    public static void SendFreeEmailRegisterConfirmation(string emailTo, string firstName, string lastName, string url)
    {
      UniMail.Template template = new UniMail.Template(HttpContext.Current.Server.MapPath(@"~\Templates\Mail\registerFreeEmailConfirm.txt"));

      template.Encoding = System.Text.Encoding.UTF8;
      template.ToEmail = emailTo;
      template.Data.Add("{{FirstName}}", firstName);
      template.Data.Add("{{LastName}}", lastName);
      template.Data.Add("{{Url}}", url);
      ParseCommonData(template);
      UniMail.Mailer.Send(template.Render()); ;
    }
コード例 #29
0
ファイル: Mail.cs プロジェクト: clpereira2001/Lelands-Master
    internal static void SendMailTheLot(string emailTo, string loginName, string ownerEmail, string messageText, long auctionID, string auctionTitle, string auctionDescription, string auctionUrl)
    {
      UniMail.Template template = new UniMail.Template(HttpContext.Current.Server.MapPath(@"~\Templates\Mail\MailTheLot.txt"));

      template.Encoding = System.Text.Encoding.UTF8;
      template.ToEmail = emailTo;
      template.Data.Add("{{loginName}}", loginName);
      template.Data.Add("{{ownerEmail}}", ownerEmail);
      template.Data.Add("{{messageText}}", messageText);

      template.Data.Add("{{auctionID}}", auctionID);
      template.Data.Add("{{auctionTitle}}", auctionTitle);
      template.Data.Add("{{auctionDescription}}", auctionDescription);
      template.Data.Add("{{auctionUrl}}", auctionUrl);

      ParseCommonData(template);

      UniMail.Mailer.Send(template.Render()); ;
    }
コード例 #30
0
        public static void SendFutureEventsPerShopper(string email, string firstname, string lastname, string login, List <AuctionShort> auctions, bool ishtml)
        {
            try
            {
                if (ishtml)
                {
                    UniMail.Template template = new UniMail.Template(HttpContext.Current.Server.MapPath(@"~\Templates\Mail\ReceivePersonalShopperUpdate.txt"));
                    template.Encoding = System.Text.Encoding.UTF8;
                    template.ToEmail  = email;

                    StringBuilder sb = new StringBuilder();
                    string        str, image_path;
                    str = image_path = String.Empty;
                    bool           line = true;
                    LinkedResource lr;
                    int            imgNumber = 0;
                    FileInfo       fi;

                    //fi = new FileInfo(HttpContext.Current.Server.MapPath(String.Format(@"~/public/images/logo_1.jpg")));
                    //if (fi.Exists)
                    //{
                    //  lr = new LinkedResource(fi.FullName);
                    //  lr.ContentId = "logo";
                    //  lr.TransferEncoding = TransferEncoding.Base64;
                    //  template.LinkedResourceCollection.Add(lr);
                    //}
                    //fi = new FileInfo(HttpContext.Current.Server.MapPath(String.Format(@"~/public/images/logo_text_tr.gif")));
                    //if (fi.Exists)
                    //{
                    //  lr = new LinkedResource(fi.FullName);
                    //  lr.ContentId = "logo_text";
                    //  lr.TransferEncoding = TransferEncoding.Base64;
                    //  template.LinkedResourceCollection.Add(lr);
                    //}

                    foreach (AuctionShort a in auctions)
                    {
                        image_path = a.ThumbnailPath;
                        str        = String.Empty;
                        if (!String.IsNullOrEmpty(image_path))
                        {
                            fi = new FileInfo(HttpContext.Current.Server.MapPath(AppHelper.AuctionImage(a.LinkParams.ID, image_path)));
                            if (fi.Exists)
                            {
                                lr                  = new LinkedResource(fi.FullName);
                                lr.ContentId        = "img" + (++imgNumber).ToString();
                                lr.TransferEncoding = TransferEncoding.Base64;
                                template.LinkedResourceCollection.Add(lr);
                                str = "<img src=\"cid:img" + imgNumber.ToString() + "\">";
                            }
                            else
                            {
                                str = "&nbsp;";
                            }
                        }
                        sb.AppendFormat("<tr {0}><td colspan=\"2\"><hr /></td></tr>", (line) ? "style='background-color:#d9e9f0'" : String.Empty);
                        sb.AppendFormat("<tr {0}><td align=\"left\" rowspan=\"3\" style='padding:5px'>{3}</td><td style='text-align:left;'><a href=\"{4}\"><b>{1}</b></a></td></tr><tr {0}><td>{2}</td></tr><tr {0}><td><i>{5}</i></td></tr>", (line) ? "style='background-color:#d9e9f0'" : String.Empty, a.LinkParams.Title, /*a.DescriptionWithoutTagsShort*/ String.Empty, str, AppHelper.GetSiteUrl(String.Format("/Auction/AuctionDetail/{0}/{1}/{2}/{3}", a.LinkParams.ID, a.LinkParams.EventUrl, a.LinkParams.CategoryUrl, a.LinkParams.LotTitleUrl)), String.Format("({0} ET to {1} ET)", a.StartDate, a.EndDate));
                        line = !line;
                    }

                    template.Data.Add("{{info}}", sb.ToString());
                    template.Data.Add("{{firstname}}", firstname);
                    template.Data.Add("{{lastname}}", lastname);
                    template.Data.Add("{{login}}", login);

                    ParseCommonData(template);

                    UniMail.Mailer.Enqueue(template.RenderHTML());
                }
                else
                {
                    UniMail.Template template = new UniMail.Template(HttpContext.Current.Server.MapPath(@"~\Templates\Mail\ReceivePersonalShopperUpdateText.txt"));

                    template.Encoding = System.Text.Encoding.UTF8;
                    template.ToEmail  = email;

                    StringBuilder sb = new StringBuilder();

                    foreach (AuctionShort a in auctions)
                    {
                        sb.AppendLine("Lot/Title: " + a.LinkParams.Lot + " - " + a.LinkParams.Title);
                        sb.AppendLine("" + String.Format("({0} ET to {1} ET)", a.StartDate, a.EndDate));
                        sb.AppendLine(AppHelper.GetSiteUrl(String.Format("/Auction/AuctionDetail/{0}/{1}/{2}/{3}", a.LinkParams.ID, a.LinkParams.EventUrl, a.LinkParams.CategoryUrl, a.LinkParams.LotTitleUrl)));
                        sb.AppendLine();
                    }

                    template.Data.Add("{{info}}", sb.ToString());
                    template.Data.Add("{{firstname}}", firstname);
                    template.Data.Add("{{lastname}}", lastname);
                    template.Data.Add("{{login}}", login);

                    ParseCommonData(template);
                    UniMail.Mailer.Enqueue(template.Render());
                }
            }
            catch (Exception ex)
            {
                Vauction.Utils.Lib.Logger.LogInfo("SendFutureEventsPerShopper error: " + ex.Message);
            }
        }
コード例 #31
0
ファイル: Mail.cs プロジェクト: clpereira2001/Lelands-Master
    public static void SendSuccessfulBidUpdateLetter(string FirstName, string LastName, string emailTo, string lot, string auctionName, string usersbid, string usersmaxbid, string auctionEndDate, string newBidUrl, bool IsMaxBidOrAmount)
    {
      UniMail.Template template = new UniMail.Template(HttpContext.Current.Server.MapPath(@"~\Templates\Mail\bidUpdate.txt"));
      template.Encoding = System.Text.Encoding.UTF8;
      template.ToEmail = emailTo;      
      template.Data.Add("{{lot}}", lot);
      template.Data.Add("{{auctionName}}", auctionName);
      template.Data.Add("{{usersbid}}", usersbid);
      template.Data.Add("{{usersmaxbid}}", usersmaxbid);
      template.Data.Add("{{auctionEndDate}}", auctionEndDate);
      template.Data.Add("{{newBidUrl}}", newBidUrl);
      template.Data.Add("{{firstName}}", FirstName);
      template.Data.Add("{{lastName}}", LastName);
      if (IsMaxBidOrAmount)
      {
        template.Data.Add("{{change_maxbid}}", "maximum bid was raised to");
        template.Data.Add("{{was_not_change_maxbid}}", "");
        template.Data.Add("{{change_bid}}", "current bid in the amount of");
        template.Data.Add("{{was_not_change_bid}}", "was not change");
      }
      else
      {
        template.Data.Add("{{change_maxbid}}", "current maximum bid in the amount of");
        template.Data.Add("{{was_not_change_maxbid}}", "was not change");
        template.Data.Add("{{change_bid}}", "bid was raised to");
        template.Data.Add("{{was_not_change_bid}}", "");
      }
      ParseCommonData(template);

      UniMail.Mailer.Enqueue(template.Render()); ;
    }
コード例 #32
0
ファイル: Mail.cs プロジェクト: clpereira2001/Lelands-Master
    public static void SendEndOfAuctionLetter(string emailTo, long auctionID, string loginName, string auctionName, string auctionEndDate, string newBidUrl)
    {
      UniMail.Template template = new UniMail.Template(HttpContext.Current.Server.MapPath(@"~\Templates\Mail\endOfAuction.txt"));

      template.Encoding = System.Text.Encoding.UTF8;
      template.ToEmail = emailTo;
      template.Data.Add("{{auctionID}}", auctionID);
      template.Data.Add("{{loginName}}", loginName);

      template.Data.Add("{{auctionName}}", auctionName);
      template.Data.Add("{{auctionEndDate}}", auctionEndDate);
      template.Data.Add("{{newBidUrl}}", newBidUrl);

      ParseCommonData(template);

      UniMail.Mailer.Send(template.Render()); ;
    }
コード例 #33
0
ファイル: Mail.cs プロジェクト: clpereira2001/Lelands-Master
    public static void SendMessageFromConsignor(string FirstName, string LastName, string Email, string Phone, string BestTime, string Description)
    {
      UniMail.Template template = new UniMail.Template(HttpContext.Current.Server.MapPath(@"~\Templates\Mail\MessageFromConsignor.txt"));
      template.Encoding = System.Text.Encoding.UTF8;
      template.ToEmail = ConfigurationManager.AppSettings["ConsignorMessagesEmail"];
      template.Data.Add("{{firstname}}", FirstName);
      template.Data.Add("{{lastname}}", LastName);
      template.Data.Add("{{email}}", Email);
      template.Data.Add("{{phone}}", Phone);
      template.Data.Add("{{best}}", BestTime);
      template.Data.Add("{{description}}", Description);
      ParseCommonData(template);

      UniMail.Mailer.Send(template.Render());
    }
コード例 #34
0
ファイル: Mail.cs プロジェクト: clpereira2001/Lelands-Master
        public static void SendWinningLetter(string FirstName, string LastName, string emailTo, long auctionID, string auctionName, string usersbid)
        {
            UniMail.Template template = new UniMail.Template(HttpContext.Current.Server.MapPath(@"~\Templates\Mail\winningBid.txt"));

              template.Encoding = System.Text.Encoding.UTF8;
              template.ToEmail = emailTo;
              template.Data.Add("{{auctionID}}", auctionID);
              template.Data.Add("{{auctionName}}", auctionName);
              template.Data.Add("{{usersbid}}", usersbid);
              //template.Data.Add("{{usersmaxbid}}", usersmaxbid);
              template.Data.Add("{{firstName}}", FirstName);
              template.Data.Add("{{lastName}}", LastName);
              ParseCommonData(template);

              UniMail.Mailer.Enqueue(template.Render());
        }
コード例 #35
0
ファイル: Mail.cs プロジェクト: clpereira2001/Lelands-Master
        public static void SendPulledOutLetter(string FirstName, string LastName, string emailTo, long auctionID, string auctionName)
        {
            UniMail.Template template = new UniMail.Template(HttpContext.Current.Server.MapPath(@"~\Templates\Mail\WithdrawnItem.txt"));

              template.Encoding = System.Text.Encoding.UTF8;
              template.ToEmail = emailTo;
              template.Data.Add("{{auctionID}}", auctionID);
              template.Data.Add("{{auctionName}}", auctionName);
              template.Data.Add("{{firstName}}", FirstName);
              template.Data.Add("{{lastName}}", LastName);
              ParseCommonData(template);

              UniMail.Mailer.Enqueue(template.Render());
        }
コード例 #36
0
ファイル: Mail.cs プロジェクト: clpereira2001/Lelands-Master
 //public static void SendInvoice(string emailTo, string invoice_id)
 //{
 //  UniMail.Template template = new UniMail.Template(HttpContext.Current.Server.MapPath(@"~\Templates\Mail\Invoices.txt"));
 //  template.Encoding = System.Text.Encoding.UTF8;
 //  template.ToEmail = emailTo;
 //  ParseCommonData(template);
 //  UniMail.Mailer.Enqueue(template.Render(HttpContext.Current.Server.MapPath(@"~\Pool\Invoices\"+invoice_id+".pdf"))); ;
 //}
 public static void Temp_SendInvoiceInformationLetter(string FirstName, string LastName, string emailTo, string invoice_id)
 {
     UniMail.Template template = new UniMail.Template(HttpContext.Current.Server.MapPath(@"~\Templates\Mail\PreviewAuctionInvoice.txt"));
       template.Encoding = System.Text.Encoding.UTF8;
       template.ToEmail = emailTo;
       template.Data.Add("{{firstName}}", FirstName);
       template.Data.Add("{{lastName}}", LastName);
       template.Data.Add("{{invoice_id}}", invoice_id);
       ParseCommonData(template);
       UniMail.Mailer.Enqueue(template.Render());
 }