Access- sending email with no outlook profile (1 Viewer)

dubmunkey

Registered User.
Local time
Today, 07:52
Joined
Jan 6, 2006
Messages
62
Hi all,

after spending wweks perfecting a database which centres on the ability to email the contents of what you have just entered i find that our stirling IT dept haven't actually setup any of my intended users with outlook profiles and do not intend to. Therefore whenever they try and send an email they get the dialog box you get when trying to connect to the internet for the first time. Which is obviously a problem.

Is there any way around this or is there any alterntive i can use? my IT dept dont promise to setup any outlook profiles soon and im hoping there may be something else i can do before the project gets binned.

cheers

greg
 

Sergeant

Someone's gotta do it
Local time
Today, 02:52
Joined
Jan 4, 2003
Messages
638
These intended users don't have any company email ability? Wow!
Do they have computers? hehe That's a start.

Do you have access to an SMTP (Simple Mail Transfer Protocol) server? If your company runs its own web server, it can be configured to handle SMTP mail. Otherwise, some ISP's allow direct mail using SMTP. I have Comcast broadband, and they most certainly do not allow it. (A55holes use this to shoot out volumes of SPAM from non-existent senders.) Unfortunately, the lack of SMTP support limits what I can get out of their $45/month service.
 

dubmunkey

Registered User.
Local time
Today, 07:52
Joined
Jan 6, 2006
Messages
62
Hehe,

to say that our IT dept is shite would soimply be the understatement of the century- want another funny one?

our sql database has no primary keys!!!! yup- you heard it, the company who designed it felt it best not to include any unique identifiers...nightmare!!

anyhoo, yes they do have access to the smtp server, they do actually use webmail but obviously access needs a profile to use to enable the outlook engine...

ive been looking at jmail and bmail, but am unsure as to how i would call the procedure in access, i would i guess use the shell command but what i want to do is program the vb so it spits out the relevant fields into the body of my text. but am a bit cluesless as to where i would program this.

greg
 

dubmunkey

Registered User.
Local time
Today, 07:52
Joined
Jan 6, 2006
Messages
62
ah this wasn't exactly right, seemed to pertain to using outlook, which i cant.

greg
 

Sergeant

Someone's gotta do it
Local time
Today, 02:52
Joined
Jan 4, 2003
Messages
638
dubmunkey said:
ah this wasn't exactly right, seemed to pertain to using outlook, which i cant.

greg
As you get to the bottom of the first page, starts to talk about CDO/SMTP.
 

dubmunkey

Registered User.
Local time
Today, 07:52
Joined
Jan 6, 2006
Messages
62
Right, had a go-

im getting a runtime error '424'- object required on this line of code:

.Item("http://schemas.microsoft.com/cdo/configuration/sendusing") = termite.pgs.org.uk ' SMTP SERVER
.Item("http://schemas.microsoft.com/cdo/configuration/smtpserver") = "212.219.13.252" ' IP OF SERVER
.Item("http://schemas.microsoft.com/cdo/configuration/smtpconnectiontimeout") = 10
.Update

this is the part im not undertstanding, ive filled in the fields needed but dunno what the hyoperlinks are about or what object i need...

cheers

greg
 

Sergeant

Someone's gotta do it
Local time
Today, 02:52
Joined
Jan 4, 2003
Messages
638
do you have that wrapped in a With [object]....End With.
 

Sergeant

Someone's gotta do it
Local time
Today, 02:52
Joined
Jan 4, 2003
Messages
638
So post your whole procedure and point out which line is getting highlighted.
 

dubmunkey

Registered User.
Local time
Today, 07:52
Joined
Jan 6, 2006
Messages
62
Here is the declaration:

Public Function SendEmail_CDO(strFrom, strTo, strCC, strSubject, strBody)

Dim mail
Dim config
Dim fields

Set mail = CreateObject("CDO.Message")
Set config = CreateObject("CDO.Configuration")
Set fields = config.fields

With fields
.Item("http://schemas.microsoft.com/cdo/configuration/sendusing") = termite.pgs.org.uk ' SMTP SERVER
.Item("http://schemas.microsoft.com/cdo/configuration/smtpserver") = "212.219.13.252" ' IP OF SERVER
.Item("http://schemas.microsoft.com/cdo/configuration/smtpconnectiontimeout") = 10
.Update
End With

Set mail.Configuration = config

With mail
.From = strFrom
.To = strTo
.CC = strCC
.Subject = strSubject
.TextBody = strBody
.Send
End With

Set mail = Nothing
Set fields = Nothing
Set config = Nothing

End Function

>>>>>>>>>>>

and here is it being called from the button command


Private Sub Command213_Click()

'build up your strings

strTo = "g.spicer@pgs.org.uk"
strFrom = "me@mydomain.co.uk"
strCC = ""
strBody = "Student: " & StuName & Chr(13) & Chr(13) & "Reason For Communication:" & Chr(13) & [Reason for Communication:].Value & Chr(13) & Chr(13) & "Main Points of Discussion:" & Chr(13) & [Main Points of Discussion:] & Chr(13) & Chr(13) & "Action Taken/ Recommendations Made:" & Chr(13) & [Action Taken/ Recommendations Made:]
strSubject = "Pastoral Concern for: Student #" & Me.StudentID.Value & _
"; - " & Format(Date_Logged.Value, "dd/mm/yy")
' then send the email
strResponse = SendEmail_CDO(strFrom, strTo, strCC, strSubject, strBody)




End Sub


Basically i understand the concept but am not very experienced and dont understand what the highlighted line is pertaining to (well actually the hyperlink within that and am sure i have to define what the item belongs to)- the highligheted line is where the code stops and throws up the error.

i was originally trying to use the bmail program, i was able to declare it but unable to work out a way of calling it so am trying with the internal smtp system.

as you can see my subject and body are made up of a number of fields all joined together- im therefore hoping there is not too small a character limit with smtp mail.

greg
 
Last edited:

Users who are viewing this thread

Top Bottom