473,795 Members | 2,863 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Can Access autosend email through SMTP (w/o download) or through squirrelmail?

1 New Member
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
Mar 22 '07 #1
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)
Mar 25 '07 #2
Denburt
1,356 Recognized Expert Top Contributor
Have you tried
Expand|Select|Wrap|Line Numbers
  1. 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.

Expand|Select|Wrap|Line Numbers
  1. Public Function CPExp()
  2. Dim strTo As String, strFrom As String
  3. Dim stSub As String ' Subject
  4. Dim stMsg As String ' Body of Message
  5. Dim stRpt As String ' Name of Report
  6. Dim strCC As String
  7. Dim strBcc As String
  8. Dim iMsg As New CDO.Message
  9. Dim iConf As New CDO.Configuration
  10. Dim Flds
  11. Dim FSO, ts, tsR, i As Integer, Cnt(3)
  12. stRpt = "My Report"
  13. strTo = "1@2.com"
  14. strCC = "2@3.com"
  15. strBcc = "3@4.com"
  16. strFrom = "Me@4.com"
  17. stSub = "...My subject..."
  18. stMsg = "The attached file is the latest Example Report."
  19. DoCmd.OutputTo acOutputReport, "YourReport", acFormatHTML, Application.CurrentProject.Path & "\RD.HTML", False
  20.  
  21.  Set FSO = CreateObject("Scripting.FileSystemObject")
  22.  Set ts = FSO.OpenTextFile(Application.CurrentProject.Path & "\RD.HTML", ForReading, True) '.CreateTextFile(vFile)
  23.  tsR = ts.ReadAll
  24.  
  25. Application.CurrentProject.Path & "\RD.HTML", False
  26. Const cdoSendUsingPort = 2
  27. Const strSmartHost = "YourExchangeServer" 
  28. Set iMsg = CreateObject("CDO.Message")
  29. Set iConf = CreateObject("CDO.Configuration")
  30.  
  31. ' Set the configuration fields.
  32. Set Flds = iConf.Fields
  33.  
  34. ' Set the proxy server to be used.
  35. Flds.Item("http://schemas.microsoft.com/cdo/configuration/sendusing") = cdoSendUsingPort
  36.  
  37. ' TODO: Set "someproxy:80" to the name of your proxy server.
  38. 'Flds("http://schemas.microsoft.com/cdo/configuration/urlproxyserver") = "?Exchangeserver"
  39. Flds.Item("http://schemas.microsoft.com/cdo/configuration/smtpserver") = strSmartHost
  40.  
  41. ' Set if this is a local server.
  42. 'Flds("http://schemas.microsoft.com/cdo/configuration/urlproxybypass") = "<local>"
  43.  
  44. ' Set the option to retrieve the latest content directly from the server.
  45. Flds("http://schemas.microsoft.com/cdo/configuration/urlgetlatestversion") = True
  46. Flds.Update
  47.  
  48. ' Set the message properties.
  49. With iMsg
  50. Set .Configuration = iConf
  51. ' Create the MIME representation of the Web page in the message.
  52. '.CreateMHTMLBody = "http//whatever.com"
  53. .HTMLBody = tsR '"<html><body><p>Hello </p></body></html>"
  54. '.CreateMHTMLBody Application.CurrentProject.Path & "\RD.HTML"
  55. .To = strTo
  56. .CC = strCC
  57. .BCC = strBcc
  58. .From = strFrom
  59. .Subject = stSub
  60. .Send
  61.  
  62. Set .Configuration = Nothing
  63. Set Flds = Nothing
  64. Set iConf = Nothing
  65. Set iMsg = Nothing
  66.  
  67. End With
  68.  
  69. End Function
  70.  
Mar 25 '07 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

5
5836
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...
4
2538
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
1
237
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
6
2929
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...
0
1389
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.
6
4665
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
2
3099
usafshah
by: usafshah | last post by:
How can i send email using php through SMTP server ?
1
1888
by: piyush1414 | last post by:
Dow can I access Hard Drive Smart information through JavaScript...
2
4390
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,...
0
9673
marktang
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...
0
9522
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,...
0
10443
Oralloy
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...
1
10165
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,...
0
10002
tracyyun
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...
1
7543
isladogs
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...
0
6783
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();...
0
5437
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...
3
2921
bsmnconsultancy
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...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.