Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. web service?

web service?

Scheduled Pinned Locked Moved Web Development
helpdatabasecomtutorialquestion
1 Posts 1 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    srinivassam
    wrote on last edited by
    #1

    Hi friends, i have one query ,using one of my webmethod i need to send mail. for this i used this code StringBuilder mailMessage1 = new StringBuilder(reader1.ReadToEnd()); MailMessage msgMail1 = new MailMessage(); from = "abc@y.com"; msgMail1.From = new MailAddress(from); msgMail1.To.Add(new MailAddress(toID));//toID coming from database msgMail1.Priority = MailPriority.High; msgMail1.Subject = "Service Next:Ticket No" + "" + ticketID; msgMail1.Body = mailMessage1.ToString(); msgMail1.IsBodyHtml = true; SmtpClient smtpClient1 = new SmtpClient(); smtpClient1.Host = "172.17.0.16"; smtpClient1.Send(msgMail1); problem is in my database toID has 2 values 1.mail format(ex:x@y.com) 1.Not Available if toID=mail format means i can send mails perfectly and i am returning flag from database if toID=Not Available means i am getting error (ex:email is not in correct format)i am not returning any flag. if toID=Not Available means i need to send message through webmethod . how to do this ,if anybody have idea please help me Regards RamaDevi.

    samrama

    1 Reply Last reply
    0
    Reply
    • Reply as topic
    Log in to reply
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes


    • Login

    • Don't have an account? Register

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • World
    • Users
    • Groups