Delphi Pages Forums  

Go Back   Delphi Pages Forums > Delphi Forum > General

Lost Password?

Reply
 
Thread Tools Display Modes
  #1  
Old 07-23-2012, 09:41 AM
Marsheng Marsheng is offline
Senior Member
 
Join Date: Nov 2008
Posts: 205
Default Send email addresses to Email program.

This is a bit out the ordinary but I have a name and email list in a database.

I want to export all the emails addresses to Outlook express as a blind copy.

I have been exporting the emails to a CSV file. I then use a third party email program, delete all the contacts and then import the new ones from the CSV.

This is for club correspondence.

I'm trying to automate the process as the next club secretary may no be so computer literate.

I'm not looking for a instant solution (one would be nice) but where do I start to look.
Reply With Quote
  #2  
Old 07-23-2012, 11:31 AM
Jasser Jasser is offline
Moderator
 
Join Date: Jan 2005
Location: Saudi Arabia
Posts: 4,773
Default

Why don't you send the email directly (without Outlook) from the database?
__________________
Regards,
Abdulaziz Jasser
Reply With Quote
  #3  
Old 07-23-2012, 08:37 PM
Marsheng Marsheng is offline
Senior Member
 
Join Date: Nov 2008
Posts: 205
Default

That can be done, but thinking ahead, all the ISP connection details would then have to be programmed into Delphi to use their email connection and I'm trying to make it simpler. On the other-hand I could use gmail but then they would have to be able to add text and photos to the Gmail email.

I think having the computers default email program popup and the names in the BCC would be the best option.

Just talking about it make me see a number of potential problems, hopefully less than the CSV option.
Reply With Quote
  #4  
Old 07-24-2012, 07:43 AM
Norrit Norrit is offline
Moderator
 
Join Date: Aug 2001
Location: Landgraaf
Posts: 6,707
Default

protocol you're looking for is SMAPI (starting default email client)
Quick internet search will give you the samples
Reply With Quote
  #5  
Old 07-24-2012, 10:23 AM
Marsheng Marsheng is offline
Senior Member
 
Join Date: Nov 2008
Posts: 205
Default

Code:
	protocol you're looking for is SMAPI (starting default email client)
Thanks That is what I was looking for.
Reply With Quote
  #6  
Old 07-24-2012, 12:37 PM
Jasser Jasser is offline
Moderator
 
Join Date: Jan 2005
Location: Saudi Arabia
Posts: 4,773
Default

Then check the bellow link for complete sample:

http://www.swissdelphicenter.ch/en/showcode.php?id=111
__________________
Regards,
Abdulaziz Jasser
Reply With Quote
  #7  
Old 07-24-2012, 11:54 PM
Marsheng Marsheng is offline
Senior Member
 
Join Date: Nov 2008
Posts: 205
Default

Fantastic replies. Where do I send the Gold Stars?

After bit of a scratch around I found the BCC details.

Code:
procedure TfMain.Button3Click(Sender: TObject);
var
  sEmail,sBCC,sSubject,sBody,sParam: string;
begin
  sEmail:='user@host.com';
  sBCC:='Your list';
  sSubject:='Your Subject';
  sBody:='Your Message Text';
  sParam:='mailto:'+sEmail+'?BCC='+sBCC+'&subject='+sSubject+'&Body='+sBody;
  ShellExecute(fMain.Handle,'open',PChar(sParam),nil,nil,SW_SHOWNORMAL);
end;
This is the easiest bit of code I have ever done.
Reply With Quote
  #8  
Old 07-25-2012, 10:28 PM
Marsheng Marsheng is offline
Senior Member
 
Join Date: Nov 2008
Posts: 205
Default

I forgot to add

uses
ShellApi;
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On

Forum Jump


All times are GMT. The time now is 07:42 AM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2013, vBulletin Solutions, Inc.