Ejemplo n.º 1
0
    public void SendSeller_ConfirmationMail(int intItemIndex)
    {
        string mailMessage = string.Empty;
        string mailFrom    = "*****@*****.**";
        string mailTo      = dtOrderedItems.Rows[intItemIndex]["LoginEmail"].ToString();
        string mailSubject = "Order No: " + strOrderID;

        mailMessage  = MailLogoHeader();
        mailMessage += "<div style=\"color:#000000; line-height:18px\">Dear <strong>Mr./Mrs " + dtOrderedItems.Rows[intItemIndex]["UserName"].ToString() + "</strong>,<br/>";
        mailMessage += "One of our registered user <strong style=\"font-family:Verdana;font-size:12px\">Mr. ";
        mailMessage += strBuyerName + "</strong> has bought ";
        mailMessage += "<strong style=\"font-family:Verdana;font-size:12px\">";
        mailMessage += dtOrderedItems.Rows[intItemIndex]["Quantity"].ToString() + "</strong> pcs of ";
        mailMessage += "<strong style=\"font-family:Verdana;font-size:12px\">" + dtOrderedItems.Rows[intItemIndex]["Producttitle"].ToString();
        mailMessage += "</strong>.<br/>";
        mailMessage += "Buyer's shipping address and other order related information has been given below.<br/>";
        mailMessage += "Please take necessary steps to supply the order or you can also contact the buyer.<br/>Thanks<br/>";
        mailMessage += "<strong style=\"font-family:verdana;color:red;Verdana;font-size:12px\">BoroMela </strong> on behalf of Buyer.</div>";

        mailMessage += GetOrderID_PaymentOption();
        mailMessage += GetShipping_BillingAddress();

        mailMessage += GetOrderDetail_Header();
        mailMessage += "<table id=\"OrderList\" style=\"width:100%; color:#000000; \"";
        mailMessage += "cellspacing=\"0px\"  cellpadding=\"0px\">";

        mailMessage += "<tr style=\"vertical-align:top;\">";
        mailMessage += "<td  style=\"width:190px; padding:5px\">" + dtOrderedItems.Rows[intItemIndex]["ProductTitle"].ToString() + "</td>";
        mailMessage += "<td  style=\"width:70px; padding:5px\">" + dtOrderedItems.Rows[intItemIndex]["Price"].ToString() + "</td>";
        mailMessage += "<td  style=\"width:70px; padding:5px\">" + dtOrderedItems.Rows[intItemIndex]["Currency"].ToString() + "</td>";
        mailMessage += "<td  style=\"width:70px; padding:5px\">" + dtOrderedItems.Rows[intItemIndex]["Quantity"].ToString() + "</td>";
        mailMessage += "<td  style=\"width:80px; padding:5px\">" + dtOrderedItems.Rows[intItemIndex]["Subtotal"].ToString() + "</td>";


        mailMessage += "<td class=\"columnheader\" style=\"font-weight:normal; padding:5px; line-height:18px;\">";
        mailMessage += "<strong style=\"font-size:12px;font-family:verdana\">Company/User Name: </strong>" + dtOrderedItems.Rows[intItemIndex]["SellerInfo"].ToString() + "</br>";
        mailMessage += "<strong style=\"font-size:12px;font-family:verdana\">Seller Name: </strong>" + dtOrderedItems.Rows[intItemIndex]["UserName"].ToString() + "<br /> ";
        mailMessage += "<strong style=\"font-size:12px;font-family:verdana\">Website Url: </strong>" + dtOrderedItems.Rows[intItemIndex]["URL"].ToString() + "<br />";

        mailMessage += "<strong style=\"font-size:12px;font-family:verdana\">Cell No: </strong>" + dtOrderedItems.Rows[intItemIndex]["CellNo"].ToString() + "<br/>";
        mailMessage += "<strong style=\"font-size:12px;font-family:verdana\">User Address: </strong>" + dtOrderedItems.Rows[intItemIndex]["UserAddress"].ToString() + "<br />";
        mailMessage += dtOrderedItems.Rows[intItemIndex]["State"].ToString() + ", " + dtOrderedItems.Rows[intItemIndex]["Province"].ToString() + ", ";
        mailMessage += dtOrderedItems.Rows[intItemIndex]["Country"].ToString();

        mailMessage += "</td></tr>";
        //mailMessage += "<tr><td colspan=\"6\" style=\"text-align:center;line-height:25px\">";
        //mailMessage += "<span style=\"color:#990000;font-weight:bold;font-family:verdana;\">";
        //mailMessage += "Total Amount: " + strTotalAmount + " " + strCurrency + "</span>";
        //mailMessage += "</td></tr>";
        mailMessage += "</table></div>";
        mailMessage += "<div align=\"center\" style=\"color:red; margin-top:15px; font-weight:bold\">This is an auto generated mail. Please do not reply.</div>";

        mailMessage += "</td></tr></table>";
        MailMaster.SendMail(mailTo, mailFrom, mailSubject, mailMessage);
        //Label3.Text = mailMessage;
    }
Ejemplo n.º 2
0
    protected void btnSendMail_Click(object sender, EventArgs e)
    {
        try
        {
            MailMaster.SendMail("*****@*****.**", txtEmail.Text, txtSubject.Text, txtMessage.Text);
            txtEmail.Text   = "";
            txtSubject.Text = "";
            txtMessage.Text = "";

            lblSystemMessage.Text = "Your email has been sent successfully.";
        }
        catch (Exception exp)
        {
            lblSystemMessage.Text = exp.ToString();
        }
    }
Ejemplo n.º 3
0
    protected void btnSubmit_Click(object sender, EventArgs e)
    {
        try
        {
            using (BOC_Corporate_UserProfile bocUserProfile = new BOC_Corporate_UserProfile())
            {
                EOC_PropertyBean eocPropertyBean = new EOC_PropertyBean();
                eocPropertyBean.Business_UserProfile_LoginEmail = txtLoginEmail.Text;

                DataTable dtLoginInfo = bocUserProfile.SelectRecord_ActivationLinks(eocPropertyBean);


                if (dtLoginInfo.Rows.Count > 0)
                {
                    string mailFrom    = "*****@*****.**";
                    string mailTo      = txtLoginEmail.Text;
                    string mailSubject = "Your Sign In details";
                    string mailMessage = string.Empty;

                    mailMessage  = "Dear " + dtLoginInfo.Rows[0]["BillingPerson"].ToString() + "," + Environment.NewLine;
                    mailMessage += "Your Sign In details: " + Environment.NewLine;
                    mailMessage += "<strong>Login Email :</strong>" + dtLoginInfo.Rows[0]["LoginEmail"].ToString() + Environment.NewLine;
                    mailMessage += "<strong>Password :</strong>" + dtLoginInfo.Rows[0]["LoginPassword"].ToString() + Environment.NewLine;
                    mailMessage += Environment.NewLine + Environment.NewLine;
                    mailMessage += "Thanks," + Environment.NewLine;
                    mailMessage += "boromela.com Team.";

                    MailMaster.SendMail(mailTo, mailFrom, mailSubject, mailMessage);
                    Response.Redirect("UserProfile_LoginInfo.aspx?mailSend=Yes");
                }
                else
                {
                    lblSystemMessage.Text = "Your entered email address is not associated with any of our corporate user account!";
                }
            }
        }
        catch (Exception exp)
        {
            lblSystemMessage.Text = exp.Message.ToString();
        }
    }
    protected void btnSubmit_Click(object sender, EventArgs e)
    {
        try
        {
            using (BC_CommonUser userProfile = new BC_CommonUser())
            {
                DataTable dtLoginInfo = userProfile.SelectRecord_ActivationLinks(txtLoginEmail.Text);
                if (dtLoginInfo.Rows.Count > 0)
                {
                    string mailFrom    = "*****@*****.**";
                    string mailTo      = txtLoginEmail.Text;
                    string mailSubject = "Your Login details for www.ApnerDeal.com";
                    string mailMessage = string.Empty;

                    mailMessage  = "Dear " + dtLoginInfo.Rows[0]["BillingPersonOrAdvertiserName"].ToString() + "," + Environment.NewLine;
                    mailMessage += "<br/><br/>";
                    mailMessage += "As you requested Your Login details are as below: " + Environment.NewLine;
                    mailMessage += "<br/><br/>";
                    mailMessage += "<strong>Login Email :</strong>" + dtLoginInfo.Rows[0]["LoginEmail"].ToString() + Environment.NewLine;
                    mailMessage += "<br/><br/>";
                    mailMessage += "<strong>Password :</strong>" + dtLoginInfo.Rows[0]["LoginPassword"].ToString() + Environment.NewLine;
                    mailMessage += Environment.NewLine + Environment.NewLine;
                    mailMessage += "<br/><br/>";
                    mailMessage += "Thanks," + Environment.NewLine;
                    mailMessage += "<br/><br/>";
                    mailMessage += "ApnerDeal.com Team.";

                    MailMaster.SendMail(mailTo, mailFrom, mailSubject, mailMessage);
                    Response.Redirect("ForgotPassword.aspx?mailSend=Yes");
                }
                else
                {
                    lblSystemMessage.Text = "Your entered email address is not associated with any of our user account!";
                }
            }
        }
        catch (Exception exp)
        {
            lblSystemMessage.Text = exp.Message.ToString();
        }
    }
Ejemplo n.º 5
0
 private void SendEmail()
 {
     if (Page.IsValid)
     {
         try
         {
             BC_EmailFormat_Handler bcEmail = new BC_EmailFormat_Handler();
             string strMailBody             = bcEmail.Send_Email_ToA_Friend("ApnerDeal.com Mail a Friend Service", txtFriendName.Text, txtSenderName.Text, strUrl);
             //Label1.Text = strMailBody;
             string mailTo      = txtFriendEmailAddress.Text;
             string mailFrom    = "*****@*****.**";
             string mailSubject = "ApnerDeal.com - DISCOUNT INFORMATION";
             MailMaster.SendMail(mailTo, mailFrom, mailSubject, strMailBody);
         }
         catch (Exception ex)
         {
             multiview.ActiveViewIndex = 2;
             MailMaster.SendMail("*****@*****.**", "*****@*****.**", "Error at Mail a friend service", ex.Message);
         }
         multiview.ActiveViewIndex = 1;
     }
 }
Ejemplo n.º 6
0
    /// <summary>
    /// Description      : Send activation link through email to newly registered user.
    /// Stored Procedure : -
    /// Associate Control: Executes in Page_Load event.
    /// </summary>
    private void SendActivationLink()
    {
        try
        {
            using (BOC_Corporate_UserProfile bocUserProfile = new BOC_Corporate_UserProfile())
            {
                EOC_PropertyBean eocPropertyBean = new EOC_PropertyBean();
                eocPropertyBean.Business_UserProfile_LoginEmail = lblEmailAddress.Text;

                int intActionResult = bocUserProfile.AddRecord_ActivationLinks(eocPropertyBean);

                if (intActionResult == -1)
                {
                    lblSystemMessage.Text = "User Profile not found. Please try after sometimes.";
                }
                else
                {
                    if (intActionResult > 0)
                    {
                        DataTable dtActivationLink = bocUserProfile.SelectRecord_ActivationLinks(eocPropertyBean);

                        if (dtActivationLink.Rows.Count > 0)
                        {
                            string companyName = string.Empty;
                            string linkID      = string.Empty;
                            string profileID   = string.Empty;
                            string mailBody    = string.Empty;

                            MailMaster        mailMaster = new MailMaster();
                            HttpServerUtility httpObject = HttpContext.Current.Server;

                            companyName = dtActivationLink.Rows[0]["CompanyName"].ToString();
                            linkID      = UTLUtilities.Encrypt(dtActivationLink.Rows[0]["LinkID"].ToString());
                            profileID   = UTLUtilities.Encrypt(dtActivationLink.Rows[0]["ProfileID"].ToString());

                            mailBody  = "<div style=\"font-family:Verdana; font-size:11px; padding-left:10px;\">";
                            mailBody += "Dear " + companyName + ",";
                            mailBody += "<br/><br/>";

                            mailBody += "Thank you for registration at <a href=\"http://www.apnerdeal.com\"> www.apnerdeal.com</a> ! We are pleased to welcome you to our service and we hope that you will find it very valuable and useful.";
                            mailBody += "<br/><br/>";
                            mailBody += "Your new account has been created, and only one more step is needed to login.";
                            mailBody += "<br/>";
                            mailBody += "<br/>";

                            mailBody += "Please click <a href=\"http://www.apnerdeal.com/Corporate/Default.aspx" + "\">here</a> to post discounts or deals.";
                            mailBody += "<br/><br/>";

                            mailBody += "Please click <a href=\"http://www.apnerdeal.com/Classifieds/Default.aspx" + "\">here</a> to post Classified Ad.";
                            mailBody += "<br/><br/>";

                            mailBody += "If you are unable to click the link above, please copy and paste the following link into your browser window:";
                            mailBody += "<br/><br/>";
                            mailBody += "http://www.apnerdeal.com/corporate/UserProfile_Step03.aspx?LinkCode=" + httpObject.UrlEncode(linkID) + "&ProfileCode=" + httpObject.UrlEncode(profileID);
                            mailBody += "<br/><br/>";
                            mailBody += "Best regards,";
                            mailBody += "<br/><br/>";
                            mailBody += "ApnerDeal.com Team";
                            mailBody += "<br/><br/>";
                            mailBody += "<p style=\"font-weight:bold; font-size:12px;\">This is a System Generated email, please do not reply.</p>";
                            mailBody += "</div>";

                            mailMaster.MailTo      = lblEmailAddress.Text;
                            mailMaster.MailFrom    = "*****@*****.**";
                            mailMaster.MailSubject = "Welcome to your www.ApnerDeal.com account";
                            mailMaster.MailBody    = mailBody;
                            mailMaster.IsHTMLBody  = true;

                            mailMaster.SendMail();
                        }
                    }
                    else
                    {
                        lblSystemMessage.Text = "System failed to register your profile. Please try after sometimes.";
                    }
                }
            }
        }
        catch (Exception Exp)
        {
            lblSystemMessage.Text = Exp.Message.ToString();
        }
    }
Ejemplo n.º 7
0
    private void SendBuyer_ConfirmationMail(string sellerName, string mailTo, DataTable dtOrderedItems, string strUrlContactSeller)
    {
        string mailMessage = string.Empty;
        string mailFrom    = "*****@*****.**";
        string MailBody    = "Thank you for your order at ApnerDeal.com. This is an acknowledegement of your order. Please email to [email protected] for further query.";

        string mailSubject = "Order from ApnerDeal.com";

        //string mailSubject = "Your ApnerDeal order no." + dtOrderedItems.Rows[0]["OrderID"].ToString();

        mailMessage  = UTLUtilities.MailLogoHeader();
        mailMessage += "<div style=\"color:#000000; line-height:18px\">Dear <strong>Mr./Ms. " + sellerName + "</strong>,<br/>";
        mailMessage += "<br/>";
        mailMessage += Server.HtmlEncode(MailBody);
        mailMessage += "<br/><br/>";

        mailMessage += "</br></br>Please Click on the link for Detail:";
        mailMessage += "</br><a href=\"" + strUrlContactSeller + "\" target=\"blank\">" + strUrlContactSeller + "</a>";
        //  mailMessage += "<strong>Profile ID: " + dtOrderedItems.Rows[0]["ProfileID"].ToString() + "</strong>";
        // mailMessage += "<br/><strong>Product Name: " + dtOrderedItems.Rows[0]["ProductTitle"].ToString() + "</strong>";
        mailMessage += "<br/><br/>";



        mailMessage += GetOrderDetail_Header();

        if (dtOrderedItems.Rows.Count > 0)
        {
            mailMessage += "<table id=\"OrderList\" style=\"width:100%; color:#000000; border:0px solid #EFEFE2\"";
            mailMessage += "cellspacing=\"0px\"  cellpadding=\"0px\">";
            for (int index = 0; index < dtOrderedItems.Rows.Count; index++)
            {
                string strBackgroundColor = "";
                if (index % 2 == 1)
                {
                    strBackgroundColor = "#F5F5F7";
                }
                else
                {
                    strBackgroundColor = "white";
                }
                mailMessage += "<tr style=\"vertical-align:top; background-color:" + strBackgroundColor + "\">";
                mailMessage += "<td  style=\"width:150px;padding:5px\">" + dtOrderedItems.Rows[index]["ProductTitle"].ToString() + "</td>";
                //mailMessage += "<td  style=\"width:80px;\">" + dtOrderedItems.Rows[index]["Quantity"].ToString() + "</td>";
                if (CategoryID == "9")
                {
                    mailMessage += "<td align=\"right\" style=\"width:80px;\">&nbsp;</td>";
                }
                else
                {
                    mailMessage += "<td  style=\"width:110px;\">" + dtOrderedItems.Rows[index]["SalePrice"].ToString() + "</td>";
                }
                //mailMessage += "</div><div><strong>Charge:<br/> </strong>" + dtOrderedItems.Rows[index]["CodCost"].ToString() + "</td>";
                // mailMessage += "<td  style=\"width:80px;padding:5px\">" + dtOrderedItems.Rows[index]["CodCost"].ToString() + "</td>";
                // mailMessage += "<td  style=\"width:90px;padding:5px\">" + dtOrderedItems.Rows[index]["Subtotal"].ToString() + "</td>";
                // mailMessage += "<td  style=\"width:90px;\">" + dtOrderedItems.Rows[index]["PaymentOption"].ToString() + "</td>";

                mailMessage += "<td class=\"columnheader\" style=\"font-weight:normal;padding:5px; line-height:17px;\">";
                //mailMessage += "<strong>Company Name: </strong>" + dtOrderedItems.Rows[index]["SellerInfo"].ToString() + "<br/>";
                // mailMessage += "<strong>Billing Person: </strong>" + dtOrderedItems.Rows[index]["Seller_BillingPerson"].ToString() + "<br /> ";
                mailMessage += "<strong>Seller Cell No: </strong>" + dtOrderedItems.Rows[index]["Mobile"].ToString() + "<br/>";
                mailMessage += "<strong>Seller Address: </strong>" + dtOrderedItems.Rows[index]["ContactAddress"].ToString() + "<br />";
                mailMessage += "<strong>LoginEmail: </strong>" + dtOrderedItems.Rows[index]["LoginEmail"].ToString() + "<br />";
                // mailMessage += "<strong>Website Url: </strong>" + dtOrderedItems.Rows[index]["Seller_URL"].ToString() + "<br />";
            }
            mailMessage += "</td></tr>";
            mailMessage += "<tr><td colspan=\"6\" style=\"text-align:center;line-height:25px\">";
            mailMessage += "<span style=\"color:#990000;font-weight:bold;font-family:verdana;\">";
            //mailMessage += "Total Amount: " + dtOrderedItems.Rows[0]["Currency"].ToString() + " " + dtOrderedItems.Rows[0]["SubTotal"].ToString() + "</span>";
            mailMessage += "</td></tr>";
            mailMessage += "</table></div>";
            mailMessage += "<div align=\"center\" style=\"color:red; margin-top:15px; text-align:left; font-weight:bold\">This is an auto generated mail. Please do not reply.</div>";
        }
        mailMessage += "</td></tr></table>";
        MailMaster.SendMail(mailTo, mailFrom, mailSubject, mailMessage);
    }
Ejemplo n.º 8
0
    /// <summary>
    /// Sends buyer a confirmation mail, with all the ordered Product and Seller information.
    /// </summary>
    public void SendBuyer_ConfirmationMail()
    {
        string mailMessage = string.Empty;
        string mailFrom    = "*****@*****.**";
        string mailTo      = dtBuyerInformation.Rows[0]["LoginEmail"].ToString();
        string mailSubject = "Your Ordered Product Details";

        mailMessage  = MailLogoHeader();
        mailMessage += "<div style=\"color:#000000; line-height:18px\">Dear <strong>Mr./Mrs. " + strBuyerName + "</strong>,<br/>Thank you for your order at BoroMela.com. This is a confirmation of your order.";
        mailMessage += "We will notify you as ";
        mailMessage += "soon as we ship your product.<br/> Thanks again.<br/>";
        mailMessage += "<strong style=\"font-family:Verdana;color:red; font-size:12px\">BoroMela </strong> on behalf of Seller(s)";

        mailMessage += GetOrderID_PaymentOption();

        mailMessage += GetShipping_BillingAddress();

        mailMessage += GetOrderDetail_Header();


        if (dtOrderedItems.Rows.Count > 0)
        {
            mailMessage += "<table id=\"OrderList\" style=\"width:100%; color:#000000; border:0px solid #EFEFE2\"";
            mailMessage += "cellspacing=\"0px\"  cellpadding=\"0px\">";
            for (int index = 0; index < dtOrderedItems.Rows.Count; index++)
            {
                string strBackgroundColor = "";
                if (index % 2 == 1)
                {
                    strBackgroundColor = "#F5F5F7";
                }
                else
                {
                    strBackgroundColor = "white";
                }
                mailMessage += "<tr style=\"vertical-align:top; background-color:" + strBackgroundColor + "\">";
                mailMessage += "<td  style=\"width:190px;padding:5px\">" + dtOrderedItems.Rows[index]["ProductTitle"].ToString() + "</td>";
                mailMessage += "<td  style=\"width:70px;padding:5px\">" + dtOrderedItems.Rows[index]["Price"].ToString() + "</td>";
                mailMessage += "<td  style=\"width:70px;padding:5px\">" + dtOrderedItems.Rows[index]["Currency"].ToString() + "</td>";
                mailMessage += "<td  style=\"width:70px;padding:5px\">" + dtOrderedItems.Rows[index]["Quantity"].ToString() + "</td>";
                mailMessage += "<td  style=\"width:80px;padding:5px\">" + dtOrderedItems.Rows[index]["Subtotal"].ToString() + "</td>";


                mailMessage += "<td class=\"columnheader\" style=\"font-weight:normal;padding:5px; line-height:17px;\">";
                mailMessage += "<strong style=\"font-size:12px;font-family:verdana\">Company/User Name: </strong>" + dtOrderedItems.Rows[index]["SellerInfo"].ToString() + "<br/>";
                mailMessage += "<strong style=\"font-size:12px;font-family:verdana\">Seller Name: </strong>" + dtOrderedItems.Rows[index]["UserName"].ToString() + "<br /> ";
                mailMessage += "<strong style=\"font-size:12px;font-family:verdana\">Website Url: </strong>" + dtOrderedItems.Rows[index]["URL"].ToString() + "<br />";

                mailMessage += "<strong style=\"font-size:12px;font-family:verdana\">Cell No: </strong>" + dtOrderedItems.Rows[index]["CellNo"].ToString() + "<br/>";
                mailMessage += "<strong style=\"font-size:12px;font-family:verdana\">User Address: </strong>" + dtOrderedItems.Rows[index]["UserAddress"].ToString() + "<br />";
                mailMessage += dtOrderedItems.Rows[index]["State"].ToString() + ", " + dtOrderedItems.Rows[index]["Province"].ToString() + ", ";
                mailMessage += dtOrderedItems.Rows[index]["Country"].ToString();
            }
            mailMessage += "</td></tr>";
            mailMessage += "<tr><td colspan=\"6\" style=\"text-align:center;line-height:25px\">";
            mailMessage += "<span style=\"color:#990000;font-weight:bold;font-family:verdana;\">";
            mailMessage += "Total Amount: " + strTotalAmount + " " + strCurrency + "</span>";
            mailMessage += "</td></tr>";
            mailMessage += "</table></div>";
            mailMessage += "<div align=\"center\" style=\"color:red; margin-top:15px; font-weight:bold\">This is an auto generated mail. Please do not reply.</div>";
        }
        mailMessage += "</td></tr></table>";
        //Label3.Text = mailMessage;
        MailMaster.SendMail(mailTo, mailFrom, mailSubject, mailMessage);
    }