Hey everybody,
I'm developing a database in Access 2002 for my school's journal to track incoming articles as they make their way through publication. Only 1 editor is reading an article at a time, but many have access to the database and may update information about the article (expedite requests, etc.)
What I want is that if editor 1 enters his name as "reader," then editor 2 updates the information about the article, an email is automatically sent to editor 1.
Here's the catch- b/c I don't have administrator privileges on our network, I can't download any programs to run as part of this process. This means no outlook, no firefox, and primarily, no SMTP add ons. So, is there any way that I can either (1- preferred) send the emails through SMTP without downloading any auxiliary programs, or (2- not ideal but possible) have access open internet explorer, go to webmail, log in (to the journal's email), send the mail, and close IE? I would probably want it to be run on moving to the next record or (esp. for #2) on close of Access. If it makes it any easier, the database would always be run from the school's server, and all email addresses would be ones on the school's network (first.last@sch ool.edu).
I'm a relative programming novice, so any help is greatly appreciated. Thank you!
-Adam
2 2287 nico5038 3,080
Recognized Expert Specialist
I guess that the system manager closed the email for preventing spamm bots to work. This will however effect your application too.
The IE route could be an alternative. Just place the browser control and explore the possibilities for the HTMLdocument to achieve your goal.
Nic;o)
Denburt 1,356
Recognized Expert Top Contributor
Have you tried - Docmd.SendObject acSendReport,"Your Report"
?
If that won't work you can try heading up and use CDO.
The problem is locating the exchange server, once you do that your in. There are a lot of commands some of which are commented out since they weren't needed for my purpose. I use this to export a report to html then use that as a html body for my e-mails. Works quite nicely once you find the server and get it up and running good luck let me know if I can help.
Oh and you will need to set a reference to CDO in the VBA window go to tools references and look for Microsoft CDO for exchange. -
Public Function CPExp()
-
Dim strTo As String, strFrom As String
-
Dim stSub As String ' Subject
-
Dim stMsg As String ' Body of Message
-
Dim stRpt As String ' Name of Report
-
Dim strCC As String
-
Dim strBcc As String
-
Dim iMsg As New CDO.Message
-
Dim iConf As New CDO.Configuration
-
Dim Flds
-
Dim FSO, ts, tsR, i As Integer, Cnt(3)
-
stRpt = "My Report"
-
strTo = "1@2.com"
-
strCC = "2@3.com"
-
strBcc = "3@4.com"
-
strFrom = "Me@4.com"
-
stSub = "...My subject..."
-
stMsg = "The attached file is the latest Example Report."
-
DoCmd.OutputTo acOutputReport, "YourReport", acFormatHTML, Application.CurrentProject.Path & "\RD.HTML", False
-
-
Set FSO = CreateObject("Scripting.FileSystemObject")
-
Set ts = FSO.OpenTextFile(Application.CurrentProject.Path & "\RD.HTML", ForReading, True) '.CreateTextFile(vFile)
-
tsR = ts.ReadAll
-
-
Application.CurrentProject.Path & "\RD.HTML", False
-
Const cdoSendUsingPort = 2
-
Const strSmartHost = "YourExchangeServer"
-
Set iMsg = CreateObject("CDO.Message")
-
Set iConf = CreateObject("CDO.Configuration")
-
-
' Set the configuration fields.
-
Set Flds = iConf.Fields
-
-
' Set the proxy server to be used.
-
Flds.Item("http://schemas.microsoft.com/cdo/configuration/sendusing") = cdoSendUsingPort
-
-
' TODO: Set "someproxy:80" to the name of your proxy server.
-
'Flds("http://schemas.microsoft.com/cdo/configuration/urlproxyserver") = "?Exchangeserver"
-
Flds.Item("http://schemas.microsoft.com/cdo/configuration/smtpserver") = strSmartHost
-
-
' Set if this is a local server.
-
'Flds("http://schemas.microsoft.com/cdo/configuration/urlproxybypass") = "<local>"
-
-
' Set the option to retrieve the latest content directly from the server.
-
Flds("http://schemas.microsoft.com/cdo/configuration/urlgetlatestversion") = True
-
Flds.Update
-
-
' Set the message properties.
-
With iMsg
-
Set .Configuration = iConf
-
' Create the MIME representation of the Web page in the message.
-
'.CreateMHTMLBody = "http//whatever.com"
-
.HTMLBody = tsR '"<html><body><p>Hello </p></body></html>"
-
'.CreateMHTMLBody Application.CurrentProject.Path & "\RD.HTML"
-
.To = strTo
-
.CC = strCC
-
.BCC = strBcc
-
.From = strFrom
-
.Subject = stSub
-
.Send
-
-
Set .Configuration = Nothing
-
Set Flds = Nothing
-
Set iConf = Nothing
-
Set iMsg = Nothing
-
-
End With
-
-
End Function
-
Sign in to post your reply or Sign up for a free account.
Similar topics |
by: peetm |
last post by:
I'd like to write to a log whenever a visitor to my site downloads a
file. So, I'd like the link they click to be to a php 'page' that
returns the file. Don't know how to do that!
Side Question ...
Presumably, the dialog that you see when you download a binary (asking
for a 'Save As...' file name) is put up by your browser when it 'sees'
non-text data coming back as a response? So, how would you download a
text file - and cause...
|
by: Colin Kingston |
last post by:
Hi
For a college project I intend to produce a web based access database
which will allow a group leader to send the same email to group
members registered for that group.
I want the group leader to be able to: Open a web page, choose a
group, write an email and send the email to the group.
The database will be hosted by a web hosting company which uses server
|
by: mamatha |
last post by:
Hi
i want the source code to send Emails through SMTP server
in VB and received using IMAP in VB please help me
mamatha
|
by: aljosa.mohorovic |
last post by:
I have a problem when doing indirect download of file through php, when
I click on download link Firefox and Internet Explorer give me same
options: Open and Save. Firefox opens file directly from Internet and
downloads without problem.
Internet Explorer saves file on local disk and I can open it from disk
correctly but when I try to open it directly from Internet it responds
with "There was an error opening this document. This file...
|
by: ravibrl |
last post by:
Hey I need c++ code to access a webpage and download some software. If I execute that it should download that software and it should install it in my system. Give suggestions how to write that code or send it.
| |
by: ttamilvanan81 |
last post by:
Hai,
I need to send and receive Email's using VB and Ms-Access. Am using the following code. If i run this code, i has the error message as,
Compile Error
User-defined type not defined in the code for New clsSendMail
Private Sub Command0_Click()
Set poSendMail = New clsSendMail
poSendMail.UseAuthentication = True
poSendMail.UsePopAuthentication = True
|
by: usafshah |
last post by:
How can i send email using php through SMTP server ?
|
by: piyush1414 |
last post by:
Dow can I access Hard Drive Smart information through JavaScript...
|
by: cooksc |
last post by:
I have an Access database where I want to send a PDF file as an attachment. I have code that sends the basic email from Access through LotusNotes and it works well. What I would like help on is:
Does LotusNotes need to be configured any certain way to handle the attachment?
I also need help with the VBA code to attach the PDF file to the email. The PDF name is Report1 and will be stored here C:\Temp\Report1.pdf Each time a new file is created,...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
| |
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
| |
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |