[AccessD] Email problem. Again

Rocky Smolin rockysmolin at bchacc.com
Mon Mar 1 14:56:56 CST 2010


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




More information about the AccessD mailing list