locked
mail through ASP RRS feed

  • Question

  • User-1974015687 posted
    hello champ... i want to design a web page in asp...in which i can send emails to multiple person i searched through the net but could not do it ... here is the code on which i tried... Set myMail=CreateObject("CDO.Message") myMail.Subject="Sending email with CDO" myMail.From="mymail@mydomain.com" myMail.To="someone@somedomain.com" myMail.TextBody="This is a message." myMail.Send set myMail=nothing the same thing as given in w3schools.com i copied and paste here... what extra i have todo ???any registration???or installation???or any setting??? please help...
    Monday, December 14, 2009 8:21 AM

Answers

  • User989702501 posted

    Well, the worker process also has permission?
    You can try filemon or procmon to trace the access error. Run the tool, then go to web app and try to send email with attachment, hit the error then go back to log and look for access denied entry.

    • Marked as answer by Anonymous Tuesday, September 28, 2021 12:00 AM
    Wednesday, December 16, 2009 9:38 PM

All replies

  • Monday, December 14, 2009 8:42 AM
  • User-1974015687 posted
    Any more help please???
    Tuesday, December 15, 2009 12:14 AM
  • User989702501 posted

    What's the error msgs or prob statement?
    there are ton of examples on the net, try google / bing more.

    Tuesday, December 15, 2009 1:01 AM
  • User-1974015687 posted
    no actually done in .net and here need to give mail server name...but in w3schools.com there is nothing written about to provide mail server name... with another example in net i found...
    Tuesday, December 15, 2009 1:58 AM
  • User-1974015687 posted
    Error Type: CDO.Message.1 (0x80070005) Access is denied.
    Tuesday, December 15, 2009 5:12 AM
  • User-1974015687 posted
    Error Type: CDO.Message.1 (0x80070005) Access is denied. while attaching a file... .AddAttachment "C:\Documents and Settings\D\Desktop\frog_leap.xls"
    Tuesday, December 15, 2009 5:13 AM
  • User-823196590 posted

    no actually done in .net
     

    You initially posted this in the classic ASP forum, which was the wrong place if this is about .NET.

    Tuesday, December 15, 2009 11:06 AM
  • User-1974015687 posted
    i have done email system in .net. now i want to done it in asp i have problem while attaching a file in asp my code Response.Buffer = True Response.Expires = 0 Response.ExpiresAbsolute = Now() - 1 Response.AddHeader "cache-control","private" Response.AddHeader "pragma", "no-cache" '// SETTINGS Const EMAIL_FROM ="j@gmail.com" Const EMAIL_TO = "j@yahoo.com" Const EMAIL_SUBJECT = "Contact Email" Const EMAIL_TEXT = "Test Message" If SendCDOMail Then Response.Write "Mail Sent Successfully!" Else Response.Write "Mail Send Error" End If '// SEND CDO EMAIL Function SendCDOMail() DIM objMessage, objConfig, Flds 'On Error Goto 0: On Error Resume Next SET objMessage = CreateObject("cdo.message") SET objConfig = CreateObject("cdo.configuration") SET Flds = objConfig.Fields With Flds .Item("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2 .Item("http://schemas.microsoft.com/cdo/configuration/smtpserver") = "x.y.z.w" .Item("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 25 .Update End With SET objMessage.Configuration = objConfig With objMessage .FROM = EMAIL_FROM .To = EMAIL_TO .Subject= EMAIL_SUBJECT .TextBody = EMAIL_TEXT .AddAttachment "C:\Documents and Settings\j\frog_leap.xls" .Fields.Update .Send End With SET objMessage = NOTHING SET objConfig = NOTHING If Err = 0 Then SendCDOMail = True End Function
    Wednesday, December 16, 2009 12:34 AM
  • User989702501 posted

    Does the web application has permission read the attachment file? if not grant it.

    Wednesday, December 16, 2009 2:31 AM
  • User-1974015687 posted
    where to check that???
    Wednesday, December 16, 2009 3:26 AM
  • User989702501 posted

    Dude, you need to start google/bing and do some reading..

    How to set, view, change, or remove special permissions for files and folders in Windows XP
    http://support.microsoft.com/kb/308419

    steps are similar on other OSes.

    Wednesday, December 16, 2009 4:24 AM
  • User-1974015687 posted
    has read permission infact full control... to that file
    Wednesday, December 16, 2009 4:50 AM
  • User989702501 posted

    Well, the worker process also has permission?
    You can try filemon or procmon to trace the access error. Run the tool, then go to web app and try to send email with attachment, hit the error then go back to log and look for access denied entry.

    • Marked as answer by Anonymous Tuesday, September 28, 2021 12:00 AM
    Wednesday, December 16, 2009 9:38 PM