Sunday, June 21, 2026

DOMAIN EMAIL PROGRAMMING

USING SYSTEM.NET.MAIL 

  


 SmtpClient smtpClient = new SmtpClient("globeyog.com", 25);



        smtpClient.Credentials = new System.Net.NetworkCredential("globeyog.contact@globeyog.com", "PASSWORD");

        smtpClient.DeliveryMethod = SmtpDeliveryMethod.Network;


        MailMessage mailMessage = new MailMessage("globeyog.contact@globeyog.com", txtemail.Text);

        mailMessage.Subject = "OTP Verification - GlobeYog Yoga Demo Session Registration";


        mailMessage.Body = @"

                <html>

                <head></head>

                <body style='font-family:Arial, Helvetica, sans-serif; font-size:14px;'>


                <p>Dear Student,</p>


                <p>

                Thank you for registering for the <b>Yoga Demo Session</b> with

                <b>Globeyog</b>.

                </p>


                <p>

                To complete your registration, please verify your email address using the

                One-Time Password (OTP) below:

                </p>


                <p style='font-size:20px; color:#0066CC;'>

                <b>Your OTP: " + n.ToString() + @"</b>

                </p>


                <p>

                This OTP is valid for <b>10 minutes</b>.

                Please do not share it with anyone.

                </p>


                <p>

                If you did not request this registration, please ignore this email.

                </p>


                <p>

                Thank you for choosing <b>Globeyog</b>.

                We look forward to welcoming you to the Yoga Demo Session.

                </p>


                <br />


                <p>

                Regards,<br /><br />


                 


                <b>Team Globeyog</b><br />


                Email:

                <a href='mailto:globeyog.contact@globeyog.com'>

                globeyog.contact@globeyog.com

                </a>

                <br />


                Website:

                <a href='https://globeyog.com/demosession.aspx'>

                www.globeyog.com

                </a>


                </p>


                </body>

                </html>";





          mailMessage.IsBodyHtml = true;

           smtpClient.Send(mailMessage);




      


      


No comments:

Post a Comment

DOMAIN EMAIL PROGRAMMING

USING SYSTEM.NET.MAIL      SmtpClient smtpClient = new SmtpClient("globeyog.com", 25);         smtpClient.Credentials = new System...