我想用c#發送一封電子郵件給sms程序。在正文中我想叫一個文本框,哪裏是什麼用戶價值放在那裏將是一個行有取代..是否可以在引號中間調用文本框C#VB
下面是我的編碼:
public string FromAddress = "[email protected]";
public string Password = "XXXXXXXXXX";
public string To = "[email protected]";
public string Subject = "isms";
public string Body =
"STARTISMS
username:password:1
6017xxxxxxx, <-- here is where i want to call a textbox where it will
be replace with the value entered in the box at the
interface.
testing 1234567890
ENDISMS";
public string Smtp = "smtp.gmail.com";
public int Port = 587;
請告訴我一個正確的方法來做到這一點..包括正確的方式如何寫在身體部分下面的多個文本
"STARTISMS
username:password:1
6017xxxxxxx, <-- here is where i want to call a textbox where it will be
replace with the value entered in the box at the
interface.
testing 1234567890
ENDISMS";
您不能在字段聲明中執行此操作。這是基礎知識,你應該閱讀一本好書或者教程來詳細解釋這個。 – nvoigt
謝謝! xD .... –