czeuch
Posts: 16
|
Posted: 07/22/2006, 6:28 AM |
|
Hello, Iīm trying to send an e-mail on an Afet Insert event (contato is the record name):
If contatoemail.Text.Trim().Length > 0 Or contatoemail_contato.Value.Trim().Length > 0 Then
Dim message As System.Web.Mail.MailMessage = New System.Web.Mail.MailMessage()
message.From = contatoemail.Text
message.To = contatoemail_contato.Value
message.Subject = contatoassunto.Value
message.Body = contatotexto.Text
message.BodyFormat = System.Web.Mail.MailFormat.Text
System.Web.Mail.SmtpMail.Send(message)
Else
ErrorFlag = True
contatoErrors.Add("", "Fields 'From' and 'To' are required")
End If
I just donīt have informed the SMTP Server and the Messagebox Path. Are they required? Because I donīt know what to inform in this fields, and in ASP aplication I donīt fill this fields.
Thanks!
|
|
|
Diesel
Posts: 43
|
Posted: 07/28/2006, 1:27 AM |
|
Yes you need to specify the SMTP Server name or IP address. If you do not specify this the mail will not know which gateway it has to use
|
|
|
czeuch
Posts: 16
|
Posted: 07/28/2006, 4:25 AM |
|
Iīll try this. Thanks!
|
|
|
|