Sending E-mail from Access application?

M

MusMou

My Access application does not send the E-mail witch it shoud I do not get
any Error message witch means that there is no error in the code I have
intalled the IIS and still does not work.
Is there any check list for such task?
Thanks for any help.
 
T

TC

1. Do not multi-post! Instead, CROSS-post. Look up those terms on the
web, to see why multi-posting is BAD, and makes everyone MAD!

2. The fact that you do not get an error message, does /not/ mean there
are no errors in your code. Perhaps the errors are being ignored due to
an On Error Resume Next statement.

3. You haven't shown us any code. We can not know your code through
E.S.P.! Show us the code.

4. How do you /know/ that it is not sending the email? Is it just that
the email is not arriing at the destination? Could it just be getting
lost along the way?

HTH,
TC
 
M

MusMou

Dim iMsg As Object
Dim iConf As Object
Dim iBP
Set iMsg = CreateObject("CDO.Message")
Set iConf = CreateObject("CDO.Configuration")
With iMsg
Set .Configuration = iConf

.To = To__
.CC = CC__
.From = From__
.Subject = Subject__

.HTMLBody = "<html>test</html>"

If Me!CreateInvoiceJournal.Value = True Then
Set iBP = iMsg.AddAttachment(InvoiceJournal__)
End If
Set iBP = iMsg.AddAttachment(InvoiceFile__)
.Send
End With

Set iBP = Nothing
Set iMsg = Nothing
Set iConf = Nothing

To__, CC__, From__, Subject__, InvoiceJournal__, InvoiceFile__ are fields
from
a Form


"TC" skrev:
 
T

TC

Probably not the problem, but, I notice that you do not dim iBP "as"
anything. You should probably dim it "as object". I guess that at
present, it is a variant containing an object.

I'm not familiar with CDO (though I know roughly what it is). Precisely
what is meant to happen when you execute the .Send method? Precisewly
what does happen?

HTH,
TC
 
M

MusMou

With F8 key I step trough the code the .Send methode executes and nothing
happens and no error raised!

"TC" skrev:
 
M

MusMou

..Send shoud be the last command in the code block, after that the mail should
be sent as it does in some machines.


"TC" skrev:
 
T

TC

On the machines where it works, does the .Send method send the email
invisibly (behind the scenes), or does it place it into your email
program's inbox?

Sorry to keep asking, but this is all information that you could &
should have provided in your initial post.

TC
 
M

MusMou

In the machines where it works the .Send command sends invisibly the email


"TC" skrev:
 
T

TC

Ok, here are some things that I would try.

On the machine where it does not work:

- Restart the PC, drop (close) the internet connection, and then try
again. Does it try to connect to the internet? If not, maybe there is
some problem with internet connectivity on that machine.

- Try email addresses with different domains; eg. (e-mail address removed),
(e-mail address removed). (Use your own examples, of course.) It might be that
the emails are arriving at some domains, but not at others. This is
increasingly common, these days, where everyone has a spam filter.
Perhaps, by coincidence, the bad machine is sending emails to a domain
that is not accepting them.

- Could it be a "user" difference? Perhaps the users on the good
machines have administrative priviliges, but the users on the bad
machine do not. Perhaps the software only works for users with
administrative priviliges.

- Do some google searches. I see nearly a thousand hits for "cdo send
fails" (without the quotes) in google groups, and many more in google
web.

HTH,
TC
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top