Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5
Default Send mail from Excel

Hi,
I'm writing some codes that allow users to send e-mail
from Excel using CDO object. To make it work, I need to
provide the name of the SMTP server and I don't want to
hard code it in the program. I wonder is that any
functions that can get the SMTP server name in VBA so that
I can incorporate it in my codes?

Your help is much appreciated!

Regards,
Steve C.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default Send mail from Excel

Don't know the answer, but you could create an environment variable and read
that in the program.

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)

"Steve C." wrote in message
...
Hi,
I'm writing some codes that allow users to send e-mail
from Excel using CDO object. To make it work, I need to
provide the name of the SMTP server and I don't want to
hard code it in the program. I wonder is that any
functions that can get the SMTP server name in VBA so that
I can incorporate it in my codes?

Your help is much appreciated!

Regards,
Steve C.



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,123
Default Send mail from Excel

Hi Steve

Never have look for something like this but look at this page
http://vbnet.mvps.org/

If you have setup a mail account in OE then CDO use the SMTP server from OE

More info about CDO you can find here
http://www.rondebruin.nl/cdo.htm

--
Regards Ron de Bruin
http://www.rondebruin.nl


"Steve C." wrote in message ...
Hi,
I'm writing some codes that allow users to send e-mail
from Excel using CDO object. To make it work, I need to
provide the name of the SMTP server and I don't want to
hard code it in the program. I wonder is that any
functions that can get the SMTP server name in VBA so that
I can incorporate it in my codes?

Your help is much appreciated!

Regards,
Steve C.



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5
Default Send mail from Excel

Hi Ron and Bob, thanks for your help!

-----Original Message-----
Hi Steve

Never have look for something like this but look at this

page
http://vbnet.mvps.org/

If you have setup a mail account in OE then CDO use the

SMTP server from OE

More info about CDO you can find here
http://www.rondebruin.nl/cdo.htm

--
Regards Ron de Bruin
http://www.rondebruin.nl


"Steve C." wrote in

message ...
Hi,
I'm writing some codes that allow users to send e-mail
from Excel using CDO object. To make it work, I need to
provide the name of the SMTP server and I don't want to
hard code it in the program. I wonder is that any
functions that can get the SMTP server name in VBA so

that
I can incorporate it in my codes?

Your help is much appreciated!

Regards,
Steve C.



.

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Bypass: A program is trying to send mail using Item.Send prompt Vick Excel Discussion (Misc queries) 1 June 25th 09 03:31 AM
Is their any way to set Excel to send an e-mail on date Leger Claude Comeau Excel Discussion (Misc queries) 1 May 14th 07 01:29 AM
how do I add a signature to an e-mail from excel 'send to' tpowers Excel Discussion (Misc queries) 0 July 15th 05 07:39 PM
Not using send button on excel e-mail Richard Excel Programming 3 April 2nd 04 05:14 PM
how to send e-mail from excel Barmaley Excel Programming 3 August 22nd 03 04:26 PM


All times are GMT +1. The time now is 11:00 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"