...

View Full Version : How to send Email



Cipher
09-27-2005, 12:14 AM
I tried to send email like this:

Dim EmailFrom As String = "cipher_k@hotmail.com"
Dim EmailTo As String = "cipher_kero@yahoo.com"
Dim Subject As String = "Send Email"
Dim Body As String = "I'm tryin to send email"
System.Web.Mail.SmtpMail.Send(EmailFrom, EmailTo, Subject, Body)

But it showed me this error:

The "SendUsing" configuration value is invalid

so how can i send email and wt is the SmtpMail?!

seek1
09-27-2005, 06:59 AM
Follow the link. It might help you.
http://www.startvbdotnet.com/aspsite/extras/sendmail.aspx

Cheers
Dan

Cipher
10-06-2005, 03:01 PM
Well Ok

i think i really need help :confused:

jbezweb
10-06-2005, 03:48 PM
<% @Page Language="C#" %>
<% @Import Namespace="System.Web.Mail" %>
<%
MailMessage msgMail = new MailMessage();

msgMail.To = "christophw@sleeper.Dev.AlfaSierraPapa.Com";
msgMail.Cc = "webmaster@sleeper.Dev.AlfaSierraPapa.Com";
msgMail.From = "webmaster@aspheute.com";
msgMail.Subject = "Hi Chris, another mail";

msgMail.BodyFormat = MailFormat.Html;
string strBody = "<html><body><b>Hello World</b>" +
" <font color=\"red\">ASP.NET</font></body></html>";
msgMail.Body = strBody;

SmtpMail.Send(msgMail);

Response.Write("Email was queued to disk");
%>

Cipher
10-06-2005, 06:16 PM
how can i use the image in the posting page?!

Cipher
10-07-2005, 01:49 AM
it still dont work.

jbezweb
10-07-2005, 02:03 PM
Sorry,

I forgot the Smtp server setting

add this just before the message is sent.

SmtpMail.SmtpServer = "yourISPsmtpServer";

eg. My isp is eastlink and the smtp server is smtp.eastlink.ca

miranda
10-14-2005, 08:50 PM
here is an example using vb.net


<%@ import Namespace="System.Web.Mail" %>
<script runat="server">
Sub btnSendEmail_Click(sender As Object, e As EventArgs)
Dim myMessage As String
myMessage = "this is a test email message sent using asp.net"
Dim Mail As New MailMessage
Mail.To = txtSendTo.text
Mail.Subject = "test email"
Mail.Body = myMessage
Mail.From = "me@myisp.com"
Mail.BodyFormat = MailFormat.Text
SmtpMail.SmtpServer ="mail.myisp.com"
SmtpMail.Send(Mail)

End Sub
</script>



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum