Click here to Skip to main content
16,005,141 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: deleteing from database Pin
chrispowell123453-Jun-09 22:12
chrispowell123453-Jun-09 22:12 
GeneralRe: deleteing from database Pin
Dave Kreskowiak4-Jun-09 1:22
mveDave Kreskowiak4-Jun-09 1:22 
GeneralRe: deleteing from database Pin
chrispowell123454-Jun-09 2:18
chrispowell123454-Jun-09 2:18 
QuestionTransaction deadlock crash + vb.net 2008 Pin
Pankaj Garg3-Jun-09 3:41
Pankaj Garg3-Jun-09 3:41 
AnswerRe: Transaction deadlock crash + vb.net 2008 Pin
Kschuler3-Jun-09 4:59
Kschuler3-Jun-09 4:59 
AnswerRe: Transaction deadlock crash + vb.net 2008 Pin
Dave Kreskowiak3-Jun-09 5:40
mveDave Kreskowiak3-Jun-09 5:40 
QuestionAny suggestions or guidelines with using Class Modules in VBA for MS Word / Excel Pin
psionic20093-Jun-09 0:27
psionic20093-Jun-09 0:27 
Questionproblem in sending a mail through CDO configuration using macro in Excel Pin
haijimsonjose2-Jun-09 23:25
haijimsonjose2-Jun-09 23:25 
<pre>
Hello ...
  
Problem :
problem regarding sending mail through CDO using Excel macro
For some attempts i sucussful sent mails with attachment but suddenly it droped. I dont know what was the problem but I think none of the errors were observed during the process.
More over I am not able to find mail in my inbox to which i had configured in the macro.

My system configuration is   -         Win XP Sp3 o/s &amp;amp; working on Office 2003

Excel VBA Code is as follows....

Option Explicit

Private Sub CommandButton1_Click()

Dim objMsg As Object
Dim objConf As Object
Dim objFlds As Object
Dim strBody As String

Const cdoSendUsingPickup = 1
Const cdoSendUsingPort = 2 'Must use this to use Delivery Notification
Const cdoAnonymous = 0
Const cdoBasic = 1 ' clear text
Const cdoNTLM = 2 'NTLM
'Delivery Status Notifications
Const cdoDSNDefault = 0 'None
Const cdoDSNNever = 1 'None
Const cdoDSNFailure = 2 'Failure
Const cdoDSNSuccess = 4 'Success
Const cdoDSNDelay = 8 'Delay
Const cdoDSNSuccessFailOrDelay = 14 'Success, failure or delay

Set objMsg = CreateObject("CDO.Message")
Set objConf = CreateObject("CDO.Configuration")

objConf.Load -1
Set objFlds = objConf.Fields
With objFlds
   .Item("http://schemas.microsoft.com/cdo/configuration/sendusing") = cdoSendUsingPort
   .Item("http://schemas.microsoft.com/cdo/configuration/smptserverport") = 587 '465
   .Item("http://schemas.microsoft.com/cdo/configuration/smtpserver") = "smtp.gmail.com"
   .Item("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate") = cdoBasic
   .Item("http://schemas.microsoft.com/cdo/configuration/smtpusessl") = True
   .Item("http://schemas.microsoft.com/cdo/configuration/sendusername") = "mailserver4macro@gmail.com"
   .Item("http://schemas.microsoft.com/cdo/configuration/sendpassword") = "jose309930"
   .Update
End With

strBody = "This is a sample message." & vbCrLf
strBody = strBody & "It was sent using CDO." & vbCrLf

With objMsg
   Set .Configuration = objConf
   .To = "hai_jimson_jose@yahoo.com"
   .From = "mailserver4macro@gmail.com"
   .Subject = "Hai jimson!!   This is a CDO test message"
   .TextBody = strBody
   'use .HTMLBody to send HTML email.
   '.Addattachment "c:\temp\Scripty.zip"
   .Fields("urn:schemas:mailheader:disposition-notification-to") = "mailserver4macro@gmail.com"
   .Fields("urn:schemas:mailheader:return-receipt-to") = "mailserver4macro@gmail.com"
   .DSNOptions = cdoDSNSuccessFailOrDelay
   '.Fields.Update
   .Send
End With
End Sub
</pre>
AnswerRe: problem in sending a mail through CDO configuration using macro in Excel Pin
EliottA3-Jun-09 3:17
EliottA3-Jun-09 3:17 
QuestionWhere does the custom Outlook Commandbar come from? Pin
Sonhospa2-Jun-09 22:26
Sonhospa2-Jun-09 22:26 
AnswerRe: Where does the custom Outlook Commandbar come from? Pin
Dave Kreskowiak3-Jun-09 3:19
mveDave Kreskowiak3-Jun-09 3:19 
NewsRe: Where does the custom Outlook Commandbar come from? Pin
Sonhospa3-Jun-09 4:04
Sonhospa3-Jun-09 4:04 
GeneralRe: Where does the custom Outlook Commandbar come from? Pin
Dave Kreskowiak3-Jun-09 12:37
mveDave Kreskowiak3-Jun-09 12:37 
QuestionHow to create Digital Sign For My Application Pin
Anubhava Dimri2-Jun-09 20:42
Anubhava Dimri2-Jun-09 20:42 
AnswerRe: How to create Digital Sign For My Application Pin
Christian Graus2-Jun-09 21:29
protectorChristian Graus2-Jun-09 21:29 
GeneralRe: How to create Digital Sign For My Application Pin
Anubhava Dimri2-Jun-09 21:37
Anubhava Dimri2-Jun-09 21:37 
AnswerRe: How to create Digital Sign For My Application Pin
Kschuler3-Jun-09 3:18
Kschuler3-Jun-09 3:18 
GeneralRe: How to create Digital Sign For My Application Pin
Anubhava Dimri3-Jun-09 18:11
Anubhava Dimri3-Jun-09 18:11 
GeneralRe: How to create Digital Sign For My Application Pin
0x3c03-Jun-09 21:49
0x3c03-Jun-09 21:49 
GeneralRe: How to create Digital Sign For My Application Pin
Anubhava Dimri3-Jun-09 22:17
Anubhava Dimri3-Jun-09 22:17 
QuestionVB 6.0 Language while Interpreting [modified] Pin
vhassan2-Jun-09 20:37
vhassan2-Jun-09 20:37 
Questionhow do i see/change the events of a form? Pin
neodeaths2-Jun-09 19:54
neodeaths2-Jun-09 19:54 
AnswerRe: how do i see/change the events of a form? Pin
Dave Kreskowiak3-Jun-09 2:02
mveDave Kreskowiak3-Jun-09 2:02 
GeneralRe: how do i see/change the events of a form? Pin
neodeaths4-Jun-09 5:58
neodeaths4-Jun-09 5:58 
GeneralRe: how do i see/change the events of a form? Pin
Dave Kreskowiak4-Jun-09 12:52
mveDave Kreskowiak4-Jun-09 12:52 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.