SendMail - SMTP Authentication Is Required

Feb 23, 2011

I'm using the following code to send an email from my vb.net web application.
Public Function SendMail(ByVal strTo As String, ByVal strFrom As String, _
ByVal strSubject As String, ByVal strBody As String) As String
Try
Dim SmtpServer As New SmtpClient()
Dim mail As New MailMessage()
SmtpServer.Credentials = New _
[Code] .....

It works fine when I use my personal live.co.uk email address as the strFrom value, or even a made-up email address. But when I use a different one (contact@mydomain.com), which is perfectly valid and working, I get the following error:
"The SMTP server requires a secure connection or the client was not authenticated. The server response was: SMTP authentication is required."

View 1 Replies


ADVERTISEMENT

The SMTP Server Requires A Secure Connection Or The Client Was Not Authenticated. The Server Response Was 5.5.1 Authentication Required

Nov 28, 2009

This emailing code wont seem to work in my program. I get an exception "The SMTP server requires a secure connection or the client was not authenticated. The server response was 5.5.1 authentication required."

Imports System.Net.Mail
Public Class emailStudent
Private Sub sendEmailButton_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles sendEmailButton.Click
SendMail()

[code]....

View 12 Replies

SMTP Servers That Require Authentication

Mar 18, 2010

i need to send e-mail's from the iis 6 via smtp server that are 2 diferent machines

i have this exampel but is not working

Public Sub SendMail(ByVal from As String, ByVal [to] As String, ByVal subject As String, ByVal body As String)
Dim mailClient As New SmtpClient(test.MailServer)

[Code]....

View 4 Replies

VS 2008 Send Email With SMTP Authentication?

Mar 9, 2010

How can I send an Email with VB.2008, is the SMTP server needs autentication???

I can do it without autentication, mas with that, it doesnt work

View 3 Replies

VS 2005 Proxy Authentication Required

Sep 11, 2010

I am working on my project as I am create a if statement that if there is no string in the textbox, displaying the messagebox otherwisse connect to the proxy server.[code]My problem is that how can I check if the proxy server is required for username and password, in which property that I should use in the if statement and how I can response it?

View 1 Replies

VS 2005 Proxy Authentication Required Error

Jan 7, 2010

In an app that is deployed to a diverse user base, I have code similar to the following: [code] For all users but one or two, this is fine. But one user is reporting back that he is receiving this error message:"The remote server returned an error: (407) Proxy Authentication Required."

View 1 Replies

VS 2008 - SMTP.Credentials Required To Send An Email Or Not?

Sep 29, 2009

I'm making an application in which clients can send an SMTP email. In this application a client must select their internet provider, this possibilty already works. While testing it I tried to deactivate the SMTP.Credentials in which a username and password must be entered. Deactivating/romoving this line has no effect on sending the emails.?. I tested it on my office and at home, with 2 different providers. All mails were send.

My question: Is SMTP.Credentials required to send an email or not? What effects can deleting this line have?

CODE:

View 2 Replies

When Copy Application To Server / 407 Proxy Authentication Required Error ALWAYS Comes Up

Oct 6, 2010

I have a console application created in VS2005, with a web reference created via WSDL.When I run on my local machine (and I have a browser up) I can access the web service fine (if a browser is not up I get the 407 error).I understand this,since my local client machine MUST go through the company proxy (I assume the proxy is resolved when I sign start the browser).When I copy the application to our server, the 407 proxy authentication required error ALWAYS comes up.The thing is, on the server all check boxes in internet options/connections/lan settings are NOT checked. i.e. the server DOES NOT go through a proxy.I installed wireshark to help track down the problem and it shows that when i access the web service wpad is being called and our proxy server is being called.is there a .net configuration that allows me to say "ignore the proxy".I have already tried variations on the system.net section of the app.config file: [code]It seems that no matter what we do (including changing registry settings) this application ALWAYS tries to go through a proxy.

View 1 Replies

VS 2008 Server Program Can Receive SMTP Messages From Other SMTP Servers

Aug 14, 2009

I'm using the TcpClient and TcpListener classes to read/write to the network when a request comes in on port 25. All I'm trying to do at the moment is make it so that my server program can receive SMTP messages from other SMTP servers. I've tested in Telnet - if I connect to my own IP on port 25 and type EHLO, MAIL FROM, RCPT TO, DATA etc then all works as it should and the details I entered are logged by the program (it doesnt do anything about delivering these details/email yet).all looks good... but then when I try and just send an email to my domain from my work account I can see that a connection is made to my program and the string "EHLO workdomain.com " is received by my program - my program responds to the remote SMTP server with "250-mydomain.com Hello" and then a CrLF and then "250-OK". After that point however, my app does not receive anything further at all from the server at work. I'm guessing I am doing something wrong with the data I'm returning when it sends EHLO but can anyone point me in the correct direction?

I was using telnet to test with, it seems that I have made it work only with telnet.In telnet each time I type a key the data is passed to the server, however with a real SMTP server it just sends each entire command in one go. So after altering my server a little I can now get it to respond with the 250-OK which I thought it already was doing.. but it still doesnt work. The remote server just sends EHLO and then thats it nothing more.Something interesting, at the moment I am ending all of my responses to the remote server with VbLf - if I change this to VbCrLf (which is what I believe it is meant to be according to the SMTP standard) then I get an infinite amount of empty strings sent to my program (or perhaps some other character that just shows as an empty string in intellisense when stepping through the code). Changing it back to just vbLf or ControlChars.Lf makes it go back to just sending EHLO and then nothing else..

View 4 Replies

VS 2008 Send E-mail Without Authentication For Servers Without Outgoing Authentication

Mar 28, 2011

as topic, i need to send an e-mail without outgoing authentication becouse server hasn't outgoing authentication.. how i can do this??

View 1 Replies

E Mail Text Using SendMail In VB?

Oct 15, 2009

I am sending e-mail attachments using VB and know how to code in the E-mail SUBJECT. What I want to know is: Is there any means of getting VB to insert a standard E-Mail TEXT so that I can explain what I am sending and why.

View 2 Replies

Enquire For Excel VBA Sendmail & OnKey?

Jul 2, 2009

1. Use the ActiveWorkBook.sendmail command but not sucessfully send out mail to recipient destination.

Sub Macro1()
Dim wb As Workbook
Set wb = ActiveWorkbook[code]......

2. Apply the OnKey "{ESC}","goto BreakHandler" would not work even ESCAPE key press.

Do While jj < ii + 1

Application.OnKey "{ESC}", "goto BreakHandler"
Sheets(Graph(jj)).Select
newHour = Hour(Now())[code].....

View 1 Replies

Sendmail Function VBA Excel / Outlook

May 20, 2009

adding the from line in the below code. It works fine now, but I would like to add the from line and send it on behalf of a group distribution list. I have tried multiple combinations such as From and .from, sendfrom, mailfrom, fromto.

[Code]....

View 1 Replies

Asp.net Mvc - Make A Required Class Properties Not Required

Apr 8, 2011

I have a class set up to hold values on a registration form (VB.NET, MVC), and among the properties is a Password property:

[Code]...

View 3 Replies

SendMail - Get Blocked By The "Could Not Create CDO.Message" Error

Mar 11, 2009

I'm having a little difficulty sending mail using VB.Net (2003). I'm attempting to use the company mailhost, and the usual System.Mail methods to do the send, but i get blocked by the "Could not create CDO.Message" error. I've been on MSDN, and looked through the various threads on here, and they all point to a problem with the dll.

The trouble is, that this is not a consistent error. Sometimes it works, sometimes it doesn't. It will work on one user's PC profile, but not another's on the same PC. It will send a mail for a particular user, and then 2 mins later fail to send the same mail. I've tried re-registering the dll anyway, and faffing about in the registry as per the MSDN recommendation, but no joy. And because it's so inconsistent it's proving pretty tricky to narrow down the cause.

View 1 Replies

Textbox Validation - 'REQUIRED" Property Or Control That Allow You To Make A Textbox A "required" Field?

Jul 18, 2011

Does vb 2010 have a 'REQUIRED" property or control that allow you to make a textbox a "required" field? I googled and saw something about required property in controls in toolbox but somehow I could not find it anywhere in my vb 2010 toolbox. Would it be easier to write it? Does anyone have sample code?

View 6 Replies

.net - Proxy With Smtp?

Jan 16, 2012

Private Function SendEMail(ByVal sendTo As String, ByVal subject As String) As Boolean
Try
''# Dim cr As New System.Net.NetworkCredential("me073055", "me271288")
''# Dim pr As New System.Net.WebProxy("172.31.100.25", 3128)

[code]....

I am using the given code to send emails ...i am behind a proxy server..is there any way to give the proxy settings to the smtp client??If not then how do i send emails from behind a proxy server..??These are the settings i need to use to connect to the internet...i need to set this settings in my email client also.

View 1 Replies

Get SMTP Automatically?

Sep 24, 2010

I am using code to send email through SMTP that is given manually. I wish that user does not have to give the SMTP. My application should get SMTP automatically and use that. Can I know what is the SMTP of the current ISP, with which my client is connected?

View 2 Replies

.net - Send Email Via Smtp ?

Dec 3, 2010

I need to send an email via SMTP, I have my SMTP in a Linux Centos Server, and I created the software to send emails with VB.NET 2010.After using the namespace : System.Net.Mail.SmtpClient, I receive an exception :

Mailbox name not allowed.The server response was: sorry, that domain isn't in my list of allowed rcpthosts (#5.7.1)

View 2 Replies

Asp.net - How To Configure Smtp Settings

Jun 17, 2011

Imports System.Net.Mail
Partial Class ContactUs
Inherits System.Web.UI.Page

[Code].....

what is wrong with my smtp settings? i cant send emails.

View 1 Replies

Asp.net - How To Send Form Using SMTP And .NET?

Jan 18, 2011

My code was But it only send one field value to email .... I want multiple values to be send as it is in mail

Category :
Your name :
Email ID
Mobile no. etc..

All form values will be transferred to mail ID

[Code]...

View 1 Replies

Getting SMTP Address Automatically?

Sep 24, 2010

I am using code to send email through SMTP that is given manually. I wish that user does not have to give the SMTP. My application should get SMTP automatically and use that. Can I know what is the SMTP of the current ISP, with which my client is

View 7 Replies

IDE :: Sending Mail Via Smtp?

Feb 17, 2009

I want to send an email that contains an attachment via vb.net and smtp. I used gmail as smtp server. This project works correctly when the size of attachment size is lower than 1Mb. When the size of the file is bigger than this size it makes an error. The message is this: "ContextSwitchDeadlock was detectedMessage: The CLR has been unable to transition from COM context 0x652fd8 to COM context 0x653148 for 60 seconds. The thread that owns the destination context/apartment is most likely either doing a non pumping wait or processing a very long running operation without pumping Windows messages. This situation generally has a negative performance impact and may even lead to the application becoming non responsive or memory usage accumulating continually over time. To avoid this problem, all single threaded apartment (STA) threads should use pumping wait primitives (such as CoWaitForMultipleHandles) and routinely pump messages during long running operations."I extended the timeout period but this message is shown.

View 3 Replies

Receive Email Via SMTP?

Feb 27, 2010

I have an app that sends emails out perfectly. I now need to know if it is possible to receive emails via my smtp server?

View 12 Replies

Sending E-mail Without Using Smtp?

Jun 19, 2009

I have been searching for the answer to this for quite a while but none answer me exactly. Here is my problem, I want my user to be able to send an e-mail by clicking on a button "Send" and for this e-mailk to take the e-mail address from a text box and the message from a text box (Subject can be hard coded as it will always be the same) but I need to do it without using SMPT protocols as I don't want the user to have to input lots of information regarding their e-mail etc. Is there any way to do this.

View 7 Replies

Sending Email Via Smtp?

Mar 7, 2011

how can i send an email in Visual basic? i have tried and i cannot get my code to configure with smtp.gmail.com... I need some code to do this. If it is not worth it, it is not fun - you say programmers are boring but i say they are worth it.

View 6 Replies

SMTP E-Mail Sending

May 20, 2011

I Started to create an application in vb.net and the application mainly monitors the drives and when the drive's free space is below a certain percentage it sends an e-mail to recipient chosen.. Now ive done this using the smtp server and unfortunately i'm on a domain so sending emails within the office is permitted but as soon as i try to mail to an external e-mail ex. [URL] it throughs and exception and states the following:

[Code]...

View 2 Replies

SMTP Exception - Message Could Not Be Sent?

May 5, 2011

I'm creating an application for my own use that allows me to notify my lawnmowing customers when their grass was last cut, how much they owe, etc. The application uses an SMTP client to send a MailMessage to the customers through my Yahoo! online email account. The code for sending the message is as follows:

[Code]...

However, every time I try to send the message I get an error message that says "Smtp Exception" and "Message could not be sent" or something of that sort. I have tried the following to remedy the problem:

Using different ports and clients found online Using a "Try...Catch" method to handle the exception. Every time I attempt to send the message the exception is thrown Can anyone offer some advice on how to fix this? The exception is rather vague and doesn't offer a whole lot on what needs changed, like an improper port or something.

View 3 Replies

SMTP In Sending An Email

Jul 25, 2009

look at this code and tell me what I'm doing wrong and what needs to be entered in order to finish this program,

[Code]...

View 3 Replies

SMTP Timeout Error?

Jun 11, 2011

I am using VB 2010 on a Windows 7 Home Premium PC. I can't get my my smtp code to send an email out. It always comes back with the error:"The operation has timed out"I have both a Google Mail account and a Sky Mail account both of which use the same port but can't get either to work. I have checked my firewall and the smtp port 465 is allowed and I can see the process going through the firewall.I know the mail works fine as I am using Windows Live Mail which sends and receives no problem. The code I am using is below:

Private Sub btnAddAmount_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnAddAmount.Click
Dim message As New MailMessage

[code].....

View 1 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved