[AccessD] Email problem. Again

Jim Dettman jimdettman at verizon.net
Mon Mar 1 15:58:57 CST 2010


Rocky,

  In addition to what Dan said about using withevents and getting a status
message back, you can also test SMPT (and POP servers using TELNET, a
command line utility).

http://technet.microsoft.com/en-us/library/bb123686.aspx

  You enter in commands step by step and can send an e-mail manually.

Some reasons your code might be failing (and the code you have is correct
BTW, it just may not be all that you need with this one server):

1. Wrong server IP.
2. Wrong username/password.
3. Relaying is not allowed by the server - you must be sending from an IP
address that is on the same network as the server.
4. The server requires login to the POP3 server before you can send mail.
5. The server requires an authenticated login.

  #3 you may not be able to do anything about.  #4 and #5 would be a slight
change to your code.

Jim.

-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Rocky Smolin
Sent: Monday, March 01, 2010 3:57 PM
To: 'Access Developers discussion and problem solving'
Subject: Re: [AccessD] Email problem. Again

Dan:

I'm using this code and it runs right through to the end but no email shows
up in my inbox.  Do you see a problem with the way I'm trying to use it?

Private Sub cmdSend_Click()
'Assumes you have a form with text boxes named as below

Set poSendMail = New vbSendMail.clsSendMail
poSendMail.SMTPHost = Me.txtSMTPMailServer
poSendMail.From = Me.txtSMTPUserName
poSendMail.FromDisplayName = Me.txtSMTPUserName
poSendMail.Recipient = Me.txtTestTo
poSendMail.RecipientDisplayName = Me.txtTestTo
poSendMail.ReplyToAddress = Me.txtSMTPUserName
poSendMail.Subject = Me.txtTestSubject
poSendMail.Attachment = Me.txtTestAttachment 'attached file name
poSendMail.Message = Me.txtTestMessage
poSendMail.Password = Me.txtSMTPPassword
poSendMail.Send
Set poSendMail = Nothing

End Sub

TIA

Rocky
 

-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Dan Waters
Sent: Monday, March 01, 2010 10:25 AM
To: 'Access Developers discussion and problem solving'
Subject: Re: [AccessD] Email problem. Again

Hi Rocky,

Go to http://www.freevbcode.com/ShowCode.Asp?ID=109 to download this
application and .dll.

This includes an application form where you can enter all your info and send
an email.  After you register the files vbSendMail.dll and mswinsck.ocx, and
then the email doesn't go, then it's a network issue.

I've also converted this to use with Access, and it's completely reliable.

Good luck!
Dan

-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Rocky Smolin
Sent: Monday, March 01, 2010 10:32 AM
To: 'Access Developers discussion and problem solving'
Subject: [AccessD] Email problem. Again

Dear List:

Couple years ago I got a lead here on how to automatically send emails with
reports attached from an app for one of my clients client - a patent
attorney who needs to send regular reports to all his clients.  I ended up
with a routine I got from a link called SendSMTPMail which requires a
reference to Microsoft CDO for Windows 2000 library.  

It requires that you pass to the routine the mail server name, user name,
password, and port.  

And it worked for many months.  Then it stopped.  It works on my machine
with my personal but at their site, where they're using Exchange server,
something may have changed.  Who knows?  We had a session with their network
guy but couldn't get it to work.  

OTOH, I had the client try the routine at home on his laptop using his
personal account and he reported that it failed.  Now I don't know for sure
what parameters he passed to the SendSMTPMail routine so I don't know if
they were the right ones.  But if he has the right ones, and it failed on
his personal account, then that might point to the CDO? But that's been the
same (AFAIK) since day 1.

In any event, 2 questions:

1) any ideas why this would stop working?

2) is there a more "moderne" approach to this sending of emails?  He and I
discussed using the Outlook object - I've got that code in other apps, but
since he has ambitions to resell this system to other law firms, it should
be independent of Outlook.

MTIA

Rocky Smolin

Beach Access Software

858-259-4334

www.e-z-mrp.com <http://www.e-z-mrp.com/> 

www.bchacc.com <http://www.bchacc.com/> 

 

 


--
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com

-- 
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com




More information about the AccessD mailing list