Sponsored by
www.aspnetemail.com
|
 |
Discuss This FAQ Item
Got a question? Another Suggestion? Want to post your solution? Discuss it below.
-
What do I need to send email int .net
[ Reply ]
Can I send email in .net with any product of .NET (Architect, Developer or Professional)?
Can I gain access to any class of .NET FRAMEWORK with any product of .NET (Architect, Developer or Professional)?
Thank you.
Luis Enrique Gracia Prieto [ legracia ( at ) coferdroza dot es ],
2004-03-15 04:33:24
#
-
Relaying
[ Reply ]
How do I set up relaying?
Mathieu Diepman [ mathieu dot diepman ( at ) getronics dot com ],
2004-04-05 02:51:01
#
-
RE: Relaying
[ Reply ]
You can configure SMTP services and relay setting in your Default SMTP Virtual Server (found at IIS)
Default SMTP Virtual Server > Properties>General Here you can set your SMTP server address
Properties > Access Here you can add relay server address
For local machine the address is 127.0.0.1
Hope this helps,cheers
Cijo Ceazer [ cijo_ceazer ( at ) yahoo dot co dot in ],
2005-02-20 00:37:46
#
-
RE: Relaying
[ Reply ]
SEND ME A MESSAGE BACK.
PAUL FARRELL [ FARRELL dot PAUL ( at ) VIRGIN dot NET ],
2005-08-24 12:52:21
#
-
How to make command_bottom in VB.NET send Outlook Express email
[ Reply ]
I have problem...
In my VB.Net form1, INSIDE only have one TextBox1 for store email address & one Bottom1 for use transfer the “TextBox1” contents & create the new email in outlook express
Can someone tell me the sources how to make the bottom active for the above function.
Spencer mydream@pacific.net.hk
Spencer [ mydream ( at ) pacific dot net dot hk ],
2004-07-13 22:46:41
#
-
Code or CDOSYS.DLL Load
[ Reply ]
I am attempting to send mail using an external mail server. I have read plenty about the “.fields.add” addition to the SMTPmail class . I am using the code below and get an error in Visual Studio that “fields” is not a member of System.Web.Mail.MailMessage class.
I thought that perhaps the issue is that I do not have CDOsys.dll registered on my computer. When attempting to do so (register CDOsys.dll) I get a failure to register from RegSvr32.EXE application.
Do you believe that this is the problem or do you see any other issues in my code? I’m at a loss.
Imports System Imports System.Collections Imports System.Configuration Imports System.Data Imports System.Data.SqlClient Imports System.Security.Cryptography Imports System.Text Imports System.Text.RegularExpressions Imports System.Web.Mail Imports System.Web.Mail.SmtpMail Imports System.Web Imports System.Net
. . .
Public Function
SendMail(ByVal [From] As String, ByVal [To] As String, _ ByVal [Cc] As String, ByVal [Bcc] As String, ByVal [Priority] As Mail.MailPriority, _ ByVal [Subject] As String, ByVal [BodyFormat] As Mail.MailFormat, _ ByVal [BodyEncoding] As System.Text.Encoding, ByVal [Body] As String, _ ByVal [Attachment] As String) As String
Dim mail As New MailMessage()
mail.From = [From] mail.To = [To] mail.Priority = [Priority] mail.Subject = [Subject] mail.BodyFormat = [BodyFormat] mail.BodyEncoding = [BodyEncoding] mail.Body = [Body]
' external SMTP serve If SMTPServer <> "" Then SmtpMail.SmtpServer = SMTPServer Mail.Fields.add("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate") = 1 mail.Fields.add("http://schemas.microsoft.com/cdo/configuration/sendusername") = SMTPUserName mail.Fields.add("http://schemas.microsoft.com/cdo/configuration/sendpassword") = SMTPPassword
End If
Try SmtpMail.Send(mail) Catch objException As Exception LogError(objException) End Try
End Function
warren [ wsmay ( at ) newlineservices dot com ],
2005-03-01 14:58:49
#
-
RE: Code or CDOSYS.DLL Load
[ Reply ]
You are referencing the 1.0 .NET Framework. The .Fields property was introduced in the 1.1 Framework.
Cheers! Dave
dave wanta [ dave ( at ) 123aspx dot com ],
2005-03-01 15:01:23
#
-
RE RE: Code or CDOSYS.DLL Load
[ Reply ]
Thanks. I believe that I have downloaded/installed Framework 1.1 but maybe I havent. How & where do I look to determine that 1.1 is installed?
Warren
warren [ wsmay ( at ) newlineservices dot com ],
2005-03-03 05:33:27
#
-
RE: RE RE: Code or CDOSYS.DLL Load
[ Reply ]
C:\WINNT\Microsoft.NET\Framework
or
C:\Windows\Microsoft.NET\Framework
You can see all of the versions of .Net framework you have installed. It will have a seperate folder for each version.
Greg Conely [ gjconely ( at ) imagementor dot net ],
2005-05-27 11:57:21
#
-
Problems sending email
[ Reply ]
I'm writing a program to send an email internally. Here is the code I've got:
Dim Smtp As SmtpMail Smtp.SmtpServer = "mail.co.navajo.az.us" Dim Msg As MailMessage = New MailMessage Msg.To = "james.williams@co.navajo.az.us" Msg.From = "james.williams@co.navajo.az.us" Msg.Body = "This is a test email." Msg.Subject = "New Record(s)" Smtp.Send(Msg)
I'm getting an exception thrown at the Smtp.Send(Msg) line and can't figure out exactly why. Here's the exception message that I get:
An unhandled exception of type 'System.Reflection.TargetInvocationException' occurred in mscorlib.dll Additional information: Exception has been thrown by the target of an invocation.
According to my network guru guy, "mail.co.navajo.az.us" should resolve to our mail server. Is there something I'm missing? I got this code directly from a book example.
Since I'm sending the email internally, is there anything different I must do? Our mail server is a MS Exchange mail server. Thanks for any help.
Jim Williams [ james dot williams ( at ) co dot navajo dot az dot us ],
2005-03-15 12:35:17
#
-
RE: Problems sending email
[ Reply ]
Here are the details of the error message I get. It seems to point to a problem with a library:
See the end of this message for details on invoking just-in-time (JIT) debugging instead of this dialog box.
************** Exception Text ************** System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.Runtime.InteropServices.COMException (0x80029C4A): Error loading type library/DLL. --- End of inner exception stack trace --- at System.RuntimeType.InvokeDispMethod(String name, BindingFlags invokeAttr, Object target, Object[] args, Boolean[] byrefModifiers, Int32 culture, String[] namedParameters) at System.RuntimeType.InvokeMember(String name, BindingFlags invokeAttr, Binder binder, Object target, Object[] args, ParameterModifier[] modifiers, CultureInfo culture, String[] namedParameters) at System.Web.Mail.CdoSysHelper.Send(MailMessage message) at System.Web.Mail.SmtpMail.Send(MailMessage message) at EmailTest.Form1.Button1_Click(Object sender, EventArgs e) in C:\Documents and Settings\james.williams\My Documents\Visual Studio Projects\EmailTest\Form1.vb:line 69 at System.Windows.Forms.Control.OnClick(EventArgs e) at System.Windows.Forms.Button.OnClick(EventArgs e) at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent) at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks) at System.Windows.Forms.Control.WndProc(Message& m) at System.Windows.Forms.ButtonBase.WndProc(Message& m) at System.Windows.Forms.Button.WndProc(Message& m) at System.Windows.Forms.ControlNativeWindow.OnMessage(Message& m) at System.Windows.Forms.ControlNativeWindow.WndProc(Message& m) at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
************** Loaded Assemblies ************** mscorlib Assembly Version: 1.0.5000.0 Win32 Version: 1.1.4322.2032 CodeBase: file:///c:/windows/microsoft.net/framework/v1.1.4322/mscorlib.dll ---------------------------------------- EmailTest Assembly Version: 1.0.1900.18598 Win32 Version: 1.0.1900.18598 CodeBase: file:///C:/Documents%20and%20Settings/james.williams/My%20Documents/Visual%20Studio%20Projects/EmailTest/bin/EmailTest.exe ---------------------------------------- System.Windows.Forms Assembly Version: 1.0.5000.0 Win32 Version: 1.1.4322.2032 CodeBase: file:///c:/windows/assembly/gac/system.windows.forms/1.0.5000.0__b77a5c561934e089/system.windows.forms.dll ---------------------------------------- System Assembly Version: 1.0.5000.0 Win32 Version: 1.1.4322.2032 CodeBase: file:///c:/windows/assembly/gac/system/1.0.5000.0__b77a5c561934e089/system.dll ---------------------------------------- System.Drawing Assembly Version: 1.0.5000.0 Win32 Version: 1.1.4322.2032 CodeBase: file:///c:/windows/assembly/gac/system.drawing/1.0.5000.0__b03f5f7f11d50a3a/system.drawing.dll ---------------------------------------- System.Xml Assembly Version: 1.0.5000.0 Win32 Version: 1.1.4322.2032 CodeBase: file:///c:/windows/assembly/gac/system.xml/1.0.5000.0__b77a5c561934e089/system.xml.dll ---------------------------------------- System.Web Assembly Version: 1.0.5000.0 Win32 Version: 1.1.4322.2037 CodeBase: file:///c:/windows/assembly/gac/system.web/1.0.5000.0__b03f5f7f11d50a3a/system.web.dll ----------------------------------------
************** JIT Debugging ************** To enable just in time (JIT) debugging, the config file for this application or machine (machine.config) must have the jitDebugging value set in the system.windows.forms section. The application must also be compiled with debugging enabled.
For example:
<configuration> <system.windows.forms jitDebugging="true" /> </configuration>
When JIT debugging is enabled, any unhandled exception will be sent to the JIT debugger registered on the machine rather than being handled by this dialog.
Jim Williams [ james dot williams ( at ) co dot navajo dot az dot us ],
2005-03-15 13:24:45
#
-
RE: Problems sending email
[ Reply ]
The following: ----------------------------------------------------------- Dim Smtp As SmtpMail Smtp.SmtpServer = "mail.co.navajo.az.us" Dim Msg As MailMessage = New MailMessage Msg.To = "james.williams@co.navajo.az.us" Msg.From = "james.williams@co.navajo.az.us" Msg.Body = "This is a test email." Msg.Subject = "New Record(s)" Smtp.Send(Msg) -----------------------------------------------------------
|