Visual Basic Development Bookmark and Share   
 Home > Visual Basic General > regarding email forms
 

regarding email forms

First off, I am a noob.

I workfor a printshop that screenprints customized hats,tees and a host of other stufffor a variety of small businesses. Being that we are a small business as well, we can't afford to mass ship catalogs to our clients, so I decided to builda catalog application/business card that can be emailed to them.

Theapp is rep. specific, and after choosing which options suit them best using text fields and combo boxes,upon clicking submit, the customers' info is emailed to the rep.

To do this, I am trying to get a popup window thatdisplays an email form with the 'mailto' address previously set, so it can't be altered and the info from the previous screen to be pasted in the body of the email. Upon clicking the confirm button, the mail is sent and the window is closed.I already have the code to copy the info from the textbox and combobox entries and paste it into theemail bodyin the next form, but getting the email form to be functional is appearing to be quite a feet.


How do I bind this to the send button?

here is the code I am using.




Imports

System.Net.Mail

 

Public

Class Form2

 

 

Private Sub Form2_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load

End Sub

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click

 

End Sub

Public Sub StartDefaultMail(ByVal sTo As String, _

Optional ByVal sSubject As String = "", _

Optional ByVal sMessage As String = "")

Try

sTo = UrlEncode(sTo)

sSubject = sSubject

sMessage = sMessage

Process.Start("mailto:gothickfish@yahoo.com" & sTo & "?subject=" _

& sSubject &

"&body=" & sMessage)

Catch e As Exception

MsgBox(

"Couldn't start default email application" _

& vbCrLf & e.Message)

'or

Throw New Exception("Couldn't start default email app", e)

End Try

End Sub

 

Private Function UrlEncode(ByVal sTo As String) As String

Throw New NotImplementedException

End Function

End

Class

Gothickfish  Tuesday, December 01, 2009 5:58 AM
I have no clue why the original post was spaced out like that.

Gothickfish  Tuesday, December 01, 2009 6:06 AM
Like Trujade wrote, it makes no sense to help you.

You got answer and then simply tell that the supplied code does not work, which is on a a webpage and before you used by thousands.
Success
Cor
Cor Ligthert  Tuesday, December 01, 2009 7:22 AM

You can use google to search for other answers

Custom Search

More Threads

• UserControl in StatusStrip
• Detect a Flash Drive
• how can i do with " in vb
• how to set module object as startup object for vb.net windows application ??
• install a .dll with Visual Basic 2008 program
• PropertyGrid Event to Trigger Updates?
• VB 08 webbrowser not detecting flash installation
• why don't I have to use @@identity when I'm using executenonquery
• A Problem Simple
• file and directories