Results 1 to 9 of 9

Thread: windows based email form

  1. #1

    Thread Starter
    New Member
    Join Date
    Apr 2006
    Posts
    9

    windows based email form

    I needed a form that can send an email to our delivery computer. So i
    made a form it emails fine. But the problem is when i get the form its
    jumbled up an hard to read. So i got the idea just to use
    mailformat.html. instead of mailformat.text. My question is how do i
    access the text boxes from the form in the html. Or is their another
    way that i can format the text in the email

    thanks


    ryan

  2. #2
    Fanatic Member
    Join Date
    May 2003
    Posts
    758

    Re: windows based email form

    Can you elaborate on exactly what you are trying to do?

  3. #3

    Thread Starter
    New Member
    Join Date
    Apr 2006
    Posts
    9

    Re: windows based email form

    ok lets say i have 4text boxes. The user fills in the text boxes and hit send. The email goes through fine, but I would like it to be formated so its easier to read. I want to format the email when it is received to be like this

    name.........Ryan
    Date......... 05-12-06
    Location.....Baton Rouge
    JOB...........crappy developer/Network Admin

    but withouth the .......
    Last edited by mrcmb; Apr 19th, 2006 at 01:25 PM.

  4. #4
    Fanatic Member
    Join Date
    May 2003
    Posts
    758

    Re: windows based email form

    That is easy to do. Can you send your code?

    For the body of the e-mail you would do something like:

    VB Code:
    1. Dim sBody as String = ""
    2.  
    3. sBody += "name" & vbTab & vbTab & txtName.Text & vbCRLF
    4. sBody += "Date" & vbTab & vbTab & txtDate.Text & vbCRLF
    5. sBody += "Location" & vbTab & vbTab & txtLocation.Text & vbCRLF
    6. sBody += "Job" & vbTab & vbTab & txtJob.Text
    7.  
    8. oMailer.Body = sBody

    That came off the top of my head, but I think it is real close. You may have to add or remove some of the Tabs I put in there due to the length of the fields in the title column.

  5. #5

    Thread Starter
    New Member
    Join Date
    Apr 2006
    Posts
    9

    Re: windows based email form

    thanks a bunch ill give it a try. I havent touched VB in about two years.

  6. #6
    Fanatic Member
    Join Date
    May 2003
    Posts
    758

    Re: windows based email form

    Which version are you using? Here is some great info about sending mail in VB.NET 2003 and some earlier .NET versions. It changed a little in 2005.

    http://www.systemwebmail.com/default.aspx

  7. #7

    Thread Starter
    New Member
    Join Date
    Apr 2006
    Posts
    9

    Re: windows based email form

    i have 2003 and 2005

  8. #8
    Fanatic Member
    Join Date
    May 2003
    Posts
    758

    Re: windows based email form

    In 2005, the e-mail abilities were moved from the System.Web.Mail namespace to the System.Net.Mail namespace.

  9. #9

    Thread Starter
    New Member
    Join Date
    Apr 2006
    Posts
    9

    Re: windows based email form

    is it possible to change the font of whats in the email

    ryan

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width