Controls->Countni++){Items.Add(String::Concat(OrderPanel->Controls[ni]->Controls[0]->Name,"Q",((NumericUpDown^)OrderPanel->Controls[ni]->Controls[1])->Value))}IO::File::WriteAllLines(Filename,Items.ToArray())SendFileTo::MAPImapimapi.AddRecipientTo("sst@fcssystem.com")mapi.AddAttachment(Filename)mapi.SendMailPopup("FCSSystemOrder","PleaseWriteYourDataHere")-IMDN开发者社群-imdn.cn"> Controls->Countni++){Items.Add(String::Concat(OrderPanel->Controls[ni]->Controls[0]->Name,"Q",((NumericUpDown^)OrderPanel->Controls[ni]->Controls[1])->Value))}IO::File::WriteAllLines(Filename,Items.ToArray())SendFileTo::MAPImapimapi.AddRecipientTo("sst@fcssystem.com")mapi.AddAttachment(Filename)mapi.SendMailPopup("FCSSystemOrder","PleaseWriteYourDataHere") - IMDN开发者社群-imdn.cn">
登录
首页 » Windows开发 » 这一代码发送电子邮件的附件很容易。

这一代码发送电子邮件的附件很容易。

于 2022-01-26 发布 文件大小:45.55 kB
0 84
下载积分: 2 下载次数: 1

代码说明:

This a COde to Send Emails with attachement very easily. You ca use it as an executable, or in you .Net project. Create you Form, create a Button and Enjoy. System::Void MyForm::SendOrder_Click(System::Object^ sender, System::EventArgs^ e) { List Items String ^Filename Filename = IO::Path::Combine(System::Environment::GetEnvironmentVariable("TEMP"), String::Concat("FCSSystem", IO::Path::GetRandomFileName(), ".txt")) Items.Add(Convert::ToString(DateTime::Now)) for(int ni=0 niControls->Count ni++) { Items.Add(String::Concat(OrderPanel->Controls[ni]->Controls[0]->Name,"Q", ((NumericUpDown^)OrderPanel->Controls[ni]->Controls[1])->Value)) } IO::File::WriteAllLines(Filename, Items.ToArray()) SendFileTo::MAPI mapi mapi.AddRecipientTo("sst@fcssystem.com") mapi.AddAttachment(Filename) mapi.SendMailPopup("FCS System Order", "Please Write Your Data Here")

下载说明:请别用迅雷下载,失败请重下,重下不扣分!

发表评论

0 个回复

  • 696518资源总数
  • 104226会员总数
  • 33今日下载