starcraft Posted July 4, 2003 Posted July 4, 2003 (edited) whats wrong with my mail send option? its not working Dim mailmessage As mailmessage() MailMessage.To = "" MailMessage.From = TextBox4.Text MailMessage.Subject = "New Member*" MailMessage.Body = "Username: " & Chr(13) & TextBox1.Text & Chr(13) & "Password: " & Chr(13) & TextBox2.Text & Chr(13) & "Thay are 13 or older" & Chr(13) O and VB 'splash' text onto a screen? or does it have to be in a window Edited July 4, 2003 by starcraft Quote
*Experts* mutant Posted July 4, 2003 *Experts* Posted July 4, 2003 You need to create a new instance of the MailMessage class, and you didnt fill in the .To field which specifies to whom the mail is sent. Dim message As New MailMessage() message.To = "personsemail" Quote
starcraft Posted July 5, 2003 Author Posted July 5, 2003 o i know about the .to i just removed my e-mail when i pasted the text i'll change the code. ---------- now it says that mailmessage is not declared Dim message As New MailMessage() Message.To = "someone@cox.net" Message.From = TextBox4.Text Message.Subject = "New Member*" Message.Body = "Username: " & Chr(13) & TextBox1.Text & Chr(13) & "Password: " & Chr(13) & TextBox2.Text & Chr(13) & "Thay are 13 or older" & Chr(13) it has underlined only then MailMesage() in blue saying its not declarded Quote
*Experts* mutant Posted July 5, 2003 *Experts* Posted July 5, 2003 Did you reference the System.Web assembly? You have to do that, and use the imports statement becuase you dont use the full path of the class. This is the Imports statement you need after referencing the System.Web: Imports System.Web.Mail Put that on the top of your code. Quote
starcraft Posted July 5, 2003 Author Posted July 5, 2003 o thats y it wont work. ok i'll do that, wait what form do i load it on? first one or the i use the call for it on? Quote
AndreRyan Posted July 5, 2003 Posted July 5, 2003 Put it at the top of the code area Option Strict On Option Explicit On Imports System.Web.Mail Public Class Form1 '... Quote .Net allows software to be written for any version of Windows and not break like Unmanaged applications unless using Unmanaged procedures like APIs. If your program uses large amounts of memory but releases it when something else needs it, then what's the problem?
xSwan Posted July 5, 2003 Posted July 5, 2003 U must put it in the form u are calling where U create the mail message ;) Because it need to know what "message" is. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.