private void SendMMS() { int MMSSeq = -1; FileCommonUtil fcu = new FileCommonUtil(); string filePath = fcu.CheckAttachmentKeyAndReturnFullFilePath(); //첨부할 파일이 로컬서버(attachment_key)에 있을 경우 - 첨부파일 1개 기준 if (!string.IsNullOrEmpty(filePath)) { this.SaveMMSFiles(SEND_MSG_STRING, MMS_SUBJECT, filePath, ref MMSSeq); } //첨부할 파일이 외부서버(http)에 있을 경우 else { this.SaveMMSFiles(FILE_COUNT, SEND_MSG_STRING, MMS_SUBJECT, FILE_LIST, ref MMSSeq); } if (int.Equals(-1, MMSSeq)) { xmlCommonUtil.ResponseWriteErrorMSG("MMS 발송 중 오류 발생(첨부파일 데이터 디비 저장이 올바르게 이루어지지 않았습니다.)"); return; } this.SendSMS(RECEIVER_PHONE, SENDER_PHONE, string.Empty, SEND_DATE, MSG_TYPE, MMSSeq); }
public void UploadAndPost() { FileCommonUtil fcu = new FileCommonUtil(); string fileFullPath = fcu.CheckAttachmentKeyAndReturnFullFilePath();//첨부파일 1개기준 if (string.IsNullOrEmpty(fileFullPath)) { return; } gmail mensagem = new gmail(); mensagem.auth("*****@*****.**", "lee1004"); //1)web.config포함 -> 2)cms관리 포함 mensagem.fromAlias = "kesso.kr"; //1)web.config포함 -> 2)cms관리 포함 mensagem.To = "*****@*****.**"; //1)web.config포함 -> 2)cms관리 포함 mensagem.Message = ""; mensagem.Priority = 0; mensagem.Html = false; mensagem.Subject = this.MESSAGE;//"@ks2colorworld test 한글2 "; mensagem.attach(fileFullPath); /* * if (!string.IsNullOrEmpty(this.ATTACHMENT_KEY))//attachment_key * { * FileCommonUtil fcu = new FileCommonUtil(); * mensagem.attach(fcu.ReturnFileFullPath(this.ATTACHMENT_KEY)); * //mensagem.attach(@"C:\_WAS\1_service_kesso_kr\upload\photoservice\-\photoservice_20100830121937.jpg"); * } */ //mensagem.zip("nomedoficheiro.zip", "password"); bool success = mensagem.send(); if (!success) { //추후 error로그 저장 후 메시지 전송할 것. #if FOR_TEST xmlCommonUtil.ResponseWriteErrorMSG("UpdateTwitPic Fail!!(" + fileFullPath + ")"); #else xmlCommonUtil.ResponseWriteErrorMSG("UpdateTwitPic Fail!!"); #endif return; } //추후 로그 저장 후 메시지 전송할 것. #if FOR_TEST xmlCommonUtil.ResponseWriteMSG("1", "UpdateTwitPic Success!!(" + fileFullPath + ")"); #else xmlCommonUtil.ResponseWriteMSG("1", "UpdateTwitPic Success!!"); #endif }
protected void Page_Load(object sender, EventArgs e) { if (IsPostBack) { return; } xmlCommonUtil = new XMLCommonUtil(); fileCommonUtil = new FileCommonUtil(); string gubun = xmlCommonUtil.GUBUN; string webGubun = xmlCommonUtil.WEB_GUBUN; bool passCheckSessionID = (gubun == "web" && webGubun != string.Empty); if (passCheckSessionID) { gubun = webGubun; } if (!(passCheckSessionID || xmlCommonUtil.CheckSessionID())) { //세션 채크함. return; } switch (gubun) { case FileCommonUtil.FILE_DOWNLOAD_GUBUN_value: fileCommonUtil.DownloadFile(); break; case FileCommonUtil.FILE_DELETE_GUBUN_value: fileCommonUtil.DeleteFile(); break; case FileCommonUtil.FILE_INFO_GUBUN_value: fileCommonUtil.GetFileInfo(); break; case FileCommonUtil.FILE_LIST_GUBUN_value: fileCommonUtil.GetFileNameList(); break; case FileCommonUtil.FILE_RENAME_GUBUN_value: fileCommonUtil.FileRename(); break; } }
public void send() { mensagem.auth("*****@*****.**", "lee1004"); //1)web.config포함 -> 2)cms관리 mail 포함 mensagem.fromAlias = "kesso.kr"; //1)web.config포함 -> 2)cms관리 mail 포함 mensagem.Priority = 0; if (this.P_TYPE != P_TYPE_DIRECT_value) { xmlCommonUtil.ResponseWriteErrorMSG("[p_type = direct] 이외 아직까지 구현되지 않았습니다."); return; } mensagem.Html = false; if (string.IsNullOrEmpty(this.SUBJECT)) { xmlCommonUtil.ResponseWriteErrorMSG("제목이 없습니다.[subject = ?]"); return; } mensagem.Subject = this.SUBJECT; //"test 한글2"; mensagem.Message = this.MESSAGE; // "test 한글3"; if (TO.Length == 0) { xmlCommonUtil.ResponseWriteErrorMSG("받을 사람이 없습니다.[to = ?]"); return; } foreach (string to in TO) { mensagem.To = to; } FileCommonUtil fcu = new FileCommonUtil(); string fileFullPath = fcu.CheckAttachmentKeyAndReturnFullFilePath();//첨부파일 1개기준 if (!string.IsNullOrEmpty(fileFullPath)) { mensagem.attach(fileFullPath); } bool success = mensagem.send(); if (!success) { //추후 error로그 저장 후 메시지 전송할 것. #if FOR_TEST xmlCommonUtil.ResponseWriteErrorMSG("UpdateTwitPic Fail!!(" + fileFullPath + ")"); #else xmlCommonUtil.ResponseWriteErrorMSG("UpdateTwitPic Fail!!"); #endif return; } //추후 로그 저장 후 메시지 전송할 것. #if FOR_TEST xmlCommonUtil.ResponseWriteMSG("1", "UpdateTwitPic Success!!(" + fileFullPath + ")"); #else xmlCommonUtil.ResponseWriteMSG("1", "UpdateTwitPic Success!!"); #endif }