Re: Emailing errors to me
I modified an example which uses the CDO from here: http://www.paulsadowski.com/wsh/cdo.htm
Also there is a MS reference here: http://msdn.microsoft.com/en-us/libr...exchg.10).aspx
Although I was not able to send a test email.
Code:
Private Sub Command1_Click()
On Error GoTo ErrHandler
Dim objMessage As New CDO.Message, Schema$
objMessage.Subject = "Example CDO Message"
objMessage.From = """Me"" <[email protected]>" ' change this prior to attempting to send
objMessage.To = """Me"" <[email protected]>" ' change this prior to attempting to send
objMessage.TextBody = "This is some sample message text.." & vbCrLf & "It was sent using SMTP authentication."
objMessage.MimeFormatted = False
'==This section provides the configuration information for the remote SMTP server.
Schema = "http://schemas.microsoft.com/cdo/configuration/"
With objMessage.Configuration.Fields
.Item(Schema & "sendusing") = 2 ' 1 = send via the local SMTP service Pickup directory, 2 = send via a port over the SMTP network
.Item(Schema & "smtpserver") = "mail.messagingengine.com" 'Name or IP of Remote SMTP Server
.Item(Schema & "smtpauthenticate") = 1 ' Type of authentication: 0 NONE, 1 Basic (Base64 encoded), 2 NTLM
.Item(Schema & "sendusername") = "[email protected]" 'Your UserID on the SMTP server
.Item(Schema & "sendpassword") = "password" 'Your password on the SMTP server
.Item(Schema & "smtpserverport") = 465 'Server port (typically 25)
.Item(Schema & "smtpusessl") = True 'Use SSL for the connection (False or True)
.Item(Schema & "smtpconnectiontimeout") = 10 ' seonds CDO tries to connect to the SMTP server before timing out
.Update
End With
objMessage.Send
Set objMessage = Nothing
Exit Sub
ErrHandler:
Debug.Print Err.Number & Err.Description
Set objMessage = Nothing
End Sub
This is what I tried:
Port 587 (cdoSendUsingPort, cdoBasic - base 64 encoding, SSL=false )
-2147220975The message could not be sent to the SMTP server. The transport error code was 0x80040217. The server response was not available
port 25 (cdoSendUsingPort, cdoBasic - base 64 encoding, SSL=false )
-2147220973The transport failed to connect to the server.
port 26 (cdoSendUsingPort, cdoBasic - base 64 encoding, SSL=false )
-2147220973The transport failed to connect to the server.
port 465 (same except SSL = True)
-2147220975The message could not be sent to the SMTP server. The transport error code was 0x80040217. The server response was not available
What is the problem, perhaps my timeout is too small (10 seconds)?
The fastmail site seems to suggest that I should be able to do this:
http://www.fastmail.fm/help/remote_e...and_ports.html
Also when I MX lookuped fastmail.com I got this reply:
server: MX we-dont-accept-mail.fastmail.com
So could it be that they actually don't accept emails sent this way?
Re: Emailing errors to me
Actually this was the reason:
Quote:
Dear FastMail.FM User,
You have just used our SMTP server. This service is not provided at
your membership level. Although you may use your email software to access
the service at all membership levels, you must upgrade to use SMTP.
Please see our help pages for complete details on how to setup your email
software to access your account to send and receive emails.
http://www.operamail.com/help/remote...and_ports.html
If you do wish to use this service, please upgrade your account to the
appropriate level. You can do this by logging in into the web site and
clicking 'Options' and then 'Upgrade' to upgrade your account, which
takes only a few moments.
Although if I do pay for the upgrade, will regular users running non elevated be able to send me email this way?
Re: Emailing errors to me
Quote:
Originally Posted by
Witis
Although if I do pay for the upgrade, will regular users running non elevated be able to send me email this way?
Yes, because you are elevating the user permission for the program not the email service.
Edit:
The upgrade and the user premission have nothing to do with eachother.
Re: Emailing errors to me
Quote:
Originally Posted by
Nightwalker83
Yes, because you are elevating the user permission for the program not the email service.
Edit:
The upgrade and the user premission have nothing to do with eachother.
Sorry for the question Nightwalker83, I should be able to easily test this once I can work out how to send an email via CDO to an online account, at the moment I am being held up by my email provider who doesn't allow me to do this without paying more. Perhaps there are some other free online accounts that allow me to send email via the SMTP system. Any suggestions?
Re: Emailing errors to me
Inbox.com looked promising:
Quote:
" - SMTP server: mail.inbox.lv
SMTP server’s port: 25(by default) or STMP server`s port: 587*
SMTP server’s port with TLS support: 25 or 587* (more info about TLS)
*Some Internet Service Providers block port 25. It is possible for Inbox.lv users to send messages through mail.inbox.lv using port 587.
- Username: login"
To use SMTP server is necessary to activate authentification of SMTP server.
However, there is a restriction on the number of emails per hour:
Quote:
More information:
For general users (unlike Inbox Mail + users) there are email sending restrictions on SMTP server – max 15 emails per hour.
To access e-mail server you must use Your Inbox.lv username and password in your client program.