miron
|
| Posted: 03/28/2002, 4:00 PM |
|
Anyone knows how to do this?
I've tried and failed. Please help.
Thanx!
Miron
|
|
|
 |
Alexey Alexapolsky
|
| Posted: 03/29/2002, 1:51 AM |
|
Just take the code of examples provided with JMail and paste it
into CC event. I also advice you to tell how you failed and what you tried
to do , otherwise no one will be able to help you. The more info the better.
--
Alex
CodeCharge Developer
"miron" <miron@orbister.com> wrote in message
news:a80arb$7gd$1@news.codecharge.com...
> Anyone knows how to do this?
> I've tried and failed. Please help.
>
> Thanx!
>
> Miron
>
>
|
|
|
 |
miron
|
| Posted: 03/29/2002, 8:05 AM |
|
Hi,
For easier understanding I've tried to set up the gotocode site on my server
with jmail component activated. So I've tried to compile the existing module
for CDONTS to Jmail component.
Well this is the last version of what I have tried.
It just won't work. Any idea?
______________________________________________________
'Send Emails based on SQL query
'email_sql should contain the Email & Login
function sendemailssql(email_sql, email_from, email_subject, email_body,
email_format)
sendemailssql = 0 'Email counter
openrs email_rs, email_sql
while not email_rs.EOF
'Replace [email] and [login] with actual email address and username
new_body = replace(email_body,"[email]",GetValue(email_rs, 0))
new_body = replace(new_body,"[login]",GetValue(email_rs, 1))
call sendemail(email_from, GetValue(email_rs, 0), email_subject, new_body,
email_format)
email_rs.MoveNext
sendemailssql = sendemailssql +1
wend
end function
'Send single Email
sub sendemail(email_from, email_to, email_subject, email_body,
email_format)
'Send JMail E-mail component Function
'Create the e-mail server object
Set objJMail = Server.CreateObject("JMail.SMTPMail")
'Out going SMTP mail server address
objJMail.ServerAddress = "mail.orbister.com"
'Who the e-mail is from
objJMail.Sender = "filmmm@orbister.com"
objJMail.SenderName = "email_from"
'Who the e-mail is sent to
objJMail.AddRecipient email_to
'The subject of the e-mail
objJMail.Subject = email_subject
objJMail.HTMLBody = email_body
objJMail.Body = email_body
'Importance of the e-mail
objJMail.Priority = 1
objJMail.Execute
'Close the server mail object
Set objJMail = Nothing
'Return the function as true
JMailSendMail = True
end sub
______________________________________
Thanks!
Miron
"Alexey Alexapolsky" <alexa@codecharge.com> wrote in message
news:a81df8$5vi$2@news.codecharge.com...
> Just take the code of examples provided with JMail and paste it
> into CC event. I also advice you to tell how you failed and what you tried
> to do , otherwise no one will be able to help you. The more info the
better.
>
> --
> Alex
> CodeCharge Developer
>
>
> "miron" <miron@orbister.com> wrote in message
>news:a80arb$7gd$1@news.codecharge.com...
> > Anyone knows how to do this?
> > I've tried and failed. Please help.
> >
> > Thanx!
> >
> > Miron
> >
> >
>
>
|
|
|
 |
Alexey Alexapolsky
|
| Posted: 04/02/2002, 6:26 AM |
|
Did you get any error ?
Or code works ok , but doesn't send mail ?
--
Alex
CodeCharge Developer
"miron" <miron@orbister.com> wrote in message
news:a823cp$gs7$1@news.codecharge.com...
> Hi,
> For easier understanding I've tried to set up the gotocode site on my
server
> with jmail component activated. So I've tried to compile the existing
module
> for CDONTS to Jmail component.
> Well this is the last version of what I have tried.
> It just won't work. Any idea?
> ______________________________________________________
> 'Send Emails based on SQL query
> 'email_sql should contain the Email & Login
> function sendemailssql(email_sql, email_from, email_subject, email_body,
> email_format)
> sendemailssql = 0 'Email counter
> openrs email_rs, email_sql
> while not email_rs.EOF
> 'Replace [email] and [login] with actual email address and username
> new_body = replace(email_body,"[email]",GetValue(email_rs, 0))
> new_body = replace(new_body,"[login]",GetValue(email_rs, 1))
> call sendemail(email_from, GetValue(email_rs, 0), email_subject,
new_body,
> email_format)
> email_rs.MoveNext
> sendemailssql = sendemailssql +1
> wend
> end function
>
> 'Send single Email
> sub sendemail(email_from, email_to, email_subject, email_body,
> email_format)
>
>
>
> 'Send JMail E-mail component Function
>
> 'Create the e-mail server object
> Set objJMail = Server.CreateObject("JMail.SMTPMail")
>
> 'Out going SMTP mail server address
> objJMail.ServerAddress = "mail.orbister.com"
>
> 'Who the e-mail is from
> objJMail.Sender = "filmmm@orbister.com"
> objJMail.SenderName = "email_from"
>
> 'Who the e-mail is sent to
> objJMail.AddRecipient email_to
>
> 'The subject of the e-mail
> objJMail.Subject = email_subject
>
>
> objJMail.HTMLBody = email_body
>
>
> objJMail.Body = email_body
>
> 'Importance of the e-mail
> objJMail.Priority = 1
>
> objJMail.Execute
>
> 'Close the server mail object
> Set objJMail = Nothing
>
> 'Return the function as true
> JMailSendMail = True
> end sub
> ______________________________________
> Thanks!
> Miron
>
> "Alexey Alexapolsky" <alexa@codecharge.com> wrote in message
>news:a81df8$5vi$2@news.codecharge.com...
> > Just take the code of examples provided with JMail and paste it
> > into CC event. I also advice you to tell how you failed and what you
tried
> > to do , otherwise no one will be able to help you. The more info the
> better.
> >
> > --
> > Alex
> > CodeCharge Developer
> >
> >
> > "miron" <miron@orbister.com> wrote in message
> >news:a80arb$7gd$1@news.codecharge.com...
> > > Anyone knows how to do this?
> > > I've tried and failed. Please help.
> > >
> > > Thanx!
> > >
> > > Miron
> > >
> > >
> >
> >
>
>
|
|
|
 |
miron
|
| Posted: 04/02/2002, 10:07 AM |
|
Code seems to work OK, but it doesn't send the mail.
?????
Miron
"Alexey Alexapolsky" <alexa@codecharge.com> wrote in message
news:a8cf1o$sv6$2@news.codecharge.com...
> Did you get any error ?
> Or code works ok , but doesn't send mail ?
>
> --
> Alex
> CodeCharge Developer
>
>
> "miron" <miron@orbister.com> wrote in message
>news:a823cp$gs7$1@news.codecharge.com...
> > Hi,
> > For easier understanding I've tried to set up the gotocode site on my
> server
> > with jmail component activated. So I've tried to compile the existing
> module
> > for CDONTS to Jmail component.
> > Well this is the last version of what I have tried.
> > It just won't work. Any idea?
> > ______________________________________________________
> > 'Send Emails based on SQL query
> > 'email_sql should contain the Email & Login
> > function sendemailssql(email_sql, email_from, email_subject, email_body,
> > email_format)
> > sendemailssql = 0 'Email counter
> > openrs email_rs, email_sql
> > while not email_rs.EOF
> > 'Replace [email] and [login] with actual email address and username
> > new_body = replace(email_body,"[email]",GetValue(email_rs, 0))
> > new_body = replace(new_body,"[login]",GetValue(email_rs, 1))
> > call sendemail(email_from, GetValue(email_rs, 0), email_subject,
> new_body,
> > email_format)
> > email_rs.MoveNext
> > sendemailssql = sendemailssql +1
> > wend
> > end function
> >
> > 'Send single Email
> > sub sendemail(email_from, email_to, email_subject, email_body,
> > email_format)
> >
> >
> >
> > 'Send JMail E-mail component Function
> >
> > 'Create the e-mail server object
> > Set objJMail = Server.CreateObject("JMail.SMTPMail")
> >
> > 'Out going SMTP mail server address
> > objJMail.ServerAddress = "mail.orbister.com"
> >
> > 'Who the e-mail is from
> > objJMail.Sender = "filmmm@orbister.com"
> > objJMail.SenderName = "email_from"
> >
> > 'Who the e-mail is sent to
> > objJMail.AddRecipient email_to
> >
> > 'The subject of the e-mail
> > objJMail.Subject = email_subject
> >
> >
> > objJMail.HTMLBody = email_body
> >
> >
> > objJMail.Body = email_body
> >
> > 'Importance of the e-mail
> > objJMail.Priority = 1
> >
> > objJMail.Execute
> >
> > 'Close the server mail object
> > Set objJMail = Nothing
> >
> > 'Return the function as true
> > JMailSendMail = True
> > end sub
> > ______________________________________
> > Thanks!
> > Miron
> >
> > "Alexey Alexapolsky" <alexa@codecharge.com> wrote in message
> >news:a81df8$5vi$2@news.codecharge.com...
> > > Just take the code of examples provided with JMail and paste it
> > > into CC event. I also advice you to tell how you failed and what you
> tried
> > > to do , otherwise no one will be able to help you. The more info the
> > better.
> > >
> > > --
> > > Alex
> > > CodeCharge Developer
> > >
> > >
> > > "miron" <miron@orbister.com> wrote in message
> > >news:a80arb$7gd$1@news.codecharge.com...
> > > > Anyone knows how to do this?
> > > > I've tried and failed. Please help.
> > > >
> > > > Thanx!
> > > >
> > > > Miron
> > > >
> > > >
> > >
> > >
> >
> >
>
>
|
|
|
 |
Alexey Alexapolsky
|
| Posted: 04/05/2002, 1:56 AM |
|
Then you should ask your sysadmin if he can see that any good or bad mail
from you can be seen in mail folders on server.
--
Alex
CodeCharge Developer
"miron" <miron@orbister.com> wrote in message
news:a8cs19$l68$1@news.codecharge.com...
> Code seems to work OK, but it doesn't send the mail.
> ?????
> Miron
>
>
> "Alexey Alexapolsky" <alexa@codecharge.com> wrote in message
>news:a8cf1o$sv6$2@news.codecharge.com...
> > Did you get any error ?
> > Or code works ok , but doesn't send mail ?
> >
> > --
> > Alex
> > CodeCharge Developer
> >
> >
> > "miron" <miron@orbister.com> wrote in message
> >news:a823cp$gs7$1@news.codecharge.com...
> > > Hi,
> > > For easier understanding I've tried to set up the gotocode site on my
> > server
> > > with jmail component activated. So I've tried to compile the existing
> > module
> > > for CDONTS to Jmail component.
> > > Well this is the last version of what I have tried.
> > > It just won't work. Any idea?
> > > ______________________________________________________
> > > 'Send Emails based on SQL query
> > > 'email_sql should contain the Email & Login
> > > function sendemailssql(email_sql, email_from, email_subject,
email_body,
> > > email_format)
> > > sendemailssql = 0 'Email counter
> > > openrs email_rs, email_sql
> > > while not email_rs.EOF
> > > 'Replace [email] and [login] with actual email address and username
> > > new_body = replace(email_body,"[email]",GetValue(email_rs, 0))
> > > new_body = replace(new_body,"[login]",GetValue(email_rs, 1))
> > > call sendemail(email_from, GetValue(email_rs, 0), email_subject,
> > new_body,
> > > email_format)
> > > email_rs.MoveNext
> > > sendemailssql = sendemailssql +1
> > > wend
> > > end function
> > >
> > > 'Send single Email
> > > sub sendemail(email_from, email_to, email_subject, email_body,
> > > email_format)
> > >
> > >
> > >
> > > 'Send JMail E-mail component Function
> > >
> > > 'Create the e-mail server object
> > > Set objJMail = Server.CreateObject("JMail.SMTPMail")
> > >
> > > 'Out going SMTP mail server address
> > > objJMail.ServerAddress = "mail.orbister.com"
> > >
> > > 'Who the e-mail is from
> > > objJMail.Sender = "filmmm@orbister.com"
> > > objJMail.SenderName = "email_from"
> > >
> > > 'Who the e-mail is sent to
> > > objJMail.AddRecipient email_to
> > >
> > > 'The subject of the e-mail
> > > objJMail.Subject = email_subject
> > >
> > >
> > > objJMail.HTMLBody = email_body
> > >
> > >
> > > objJMail.Body = email_body
> > >
> > > 'Importance of the e-mail
> > > objJMail.Priority = 1
> > >
> > > objJMail.Execute
> > >
> > > 'Close the server mail object
> > > Set objJMail = Nothing
> > >
> > > 'Return the function as true
> > > JMailSendMail = True
> > > end sub
> > > ______________________________________
> > > Thanks!
> > > Miron
> > >
> > > "Alexey Alexapolsky" <alexa@codecharge.com> wrote in message
> > >news:a81df8$5vi$2@news.codecharge.com...
> > > > Just take the code of examples provided with JMail and paste it
> > > > into CC event. I also advice you to tell how you failed and what you
> > tried
> > > > to do , otherwise no one will be able to help you. The more info the
> > > better.
> > > >
> > > > --
> > > > Alex
> > > > CodeCharge Developer
> > > >
> > > >
> > > > "miron" <miron@orbister.com> wrote in message
> > > >news:a80arb$7gd$1@news.codecharge.com...
> > > > > Anyone knows how to do this?
> > > > > I've tried and failed. Please help.
> > > > >
> > > > > Thanx!
> > > > >
> > > > > Miron
> > > > >
> > > > >
> > > >
> > > >
> > >
> > >
> >
> >
>
>
|
|
|
 |
|